// Code generated by protoc-gen-micro. DO NOT EDIT. // source: aiot_business.proto package aiot import ( fmt "fmt" proto "github.com/golang/protobuf/proto" math "math" ) import ( context "context" client "github.com/micro/go-micro/client" server "github.com/micro/go-micro/server" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // Reference imports to suppress errors if they are not otherwise used. var _ context.Context var _ client.Option var _ server.Option // Client API for AiotService service type AiotService interface { GetBusiness(ctx context.Context, in *BusinessReq, opts ...client.CallOption) (*BusinessReply, error) SendAiotReq(ctx context.Context, in *Protocol, opts ...client.CallOption) (*Protocol, error) } type aiotService struct { c client.Client name string } func NewAiotService(name string, c client.Client) AiotService { if c == nil { c = client.NewClient() } if len(name) == 0 { name = "aiot" } return &aiotService{ c: c, name: name, } } func (c *aiotService) GetBusiness(ctx context.Context, in *BusinessReq, opts ...client.CallOption) (*BusinessReply, error) { req := c.c.NewRequest(c.name, "AiotService.GetBusiness", in) out := new(BusinessReply) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *aiotService) SendAiotReq(ctx context.Context, in *Protocol, opts ...client.CallOption) (*Protocol, error) { req := c.c.NewRequest(c.name, "AiotService.SendAiotReq", in) out := new(Protocol) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for AiotService service type AiotServiceHandler interface { GetBusiness(context.Context, *BusinessReq, *BusinessReply) error SendAiotReq(context.Context, *Protocol, *Protocol) error } func RegisterAiotServiceHandler(s server.Server, hdlr AiotServiceHandler, opts ...server.HandlerOption) error { type aiotService interface { GetBusiness(ctx context.Context, in *BusinessReq, out *BusinessReply) error SendAiotReq(ctx context.Context, in *Protocol, out *Protocol) error } type AiotService struct { aiotService } h := &aiotServiceHandler{hdlr} return s.Handle(s.NewHandler(&AiotService{h}, opts...)) } type aiotServiceHandler struct { AiotServiceHandler } func (h *aiotServiceHandler) GetBusiness(ctx context.Context, in *BusinessReq, out *BusinessReply) error { return h.AiotServiceHandler.GetBusiness(ctx, in, out) } func (h *aiotServiceHandler) SendAiotReq(ctx context.Context, in *Protocol, out *Protocol) error { return h.AiotServiceHandler.SendAiotReq(ctx, in, out) }