// Code generated by protoc-gen-micro. DO NOT EDIT. // source: activatecode.proto package shop 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 ActivateCodeService service type ActivateCodeService interface { AddActivateCode(ctx context.Context, in *AddActivateCodeReq, opts ...client.CallOption) (*AddActivateCodeReply, error) ShowActivateCode(ctx context.Context, in *ShowActivateCodeReq, opts ...client.CallOption) (*ActivateCodeDetail, error) Active(ctx context.Context, in *ActiveReq, opts ...client.CallOption) (*ActiveReply, error) GetAllActivateCode(ctx context.Context, in *GetAllActivateCodeReq, opts ...client.CallOption) (*GetAllActivateCodeResp, error) } type activateCodeService struct { c client.Client name string } func NewActivateCodeService(name string, c client.Client) ActivateCodeService { if c == nil { c = client.NewClient() } if len(name) == 0 { name = "shop" } return &activateCodeService{ c: c, name: name, } } func (c *activateCodeService) AddActivateCode(ctx context.Context, in *AddActivateCodeReq, opts ...client.CallOption) (*AddActivateCodeReply, error) { req := c.c.NewRequest(c.name, "ActivateCodeService.AddActivateCode", in) out := new(AddActivateCodeReply) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *activateCodeService) ShowActivateCode(ctx context.Context, in *ShowActivateCodeReq, opts ...client.CallOption) (*ActivateCodeDetail, error) { req := c.c.NewRequest(c.name, "ActivateCodeService.ShowActivateCode", in) out := new(ActivateCodeDetail) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *activateCodeService) Active(ctx context.Context, in *ActiveReq, opts ...client.CallOption) (*ActiveReply, error) { req := c.c.NewRequest(c.name, "ActivateCodeService.Active", in) out := new(ActiveReply) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *activateCodeService) GetAllActivateCode(ctx context.Context, in *GetAllActivateCodeReq, opts ...client.CallOption) (*GetAllActivateCodeResp, error) { req := c.c.NewRequest(c.name, "ActivateCodeService.GetAllActivateCode", in) out := new(GetAllActivateCodeResp) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for ActivateCodeService service type ActivateCodeServiceHandler interface { AddActivateCode(context.Context, *AddActivateCodeReq, *AddActivateCodeReply) error ShowActivateCode(context.Context, *ShowActivateCodeReq, *ActivateCodeDetail) error Active(context.Context, *ActiveReq, *ActiveReply) error GetAllActivateCode(context.Context, *GetAllActivateCodeReq, *GetAllActivateCodeResp) error } func RegisterActivateCodeServiceHandler(s server.Server, hdlr ActivateCodeServiceHandler, opts ...server.HandlerOption) error { type activateCodeService interface { AddActivateCode(ctx context.Context, in *AddActivateCodeReq, out *AddActivateCodeReply) error ShowActivateCode(ctx context.Context, in *ShowActivateCodeReq, out *ActivateCodeDetail) error Active(ctx context.Context, in *ActiveReq, out *ActiveReply) error GetAllActivateCode(ctx context.Context, in *GetAllActivateCodeReq, out *GetAllActivateCodeResp) error } type ActivateCodeService struct { activateCodeService } h := &activateCodeServiceHandler{hdlr} return s.Handle(s.NewHandler(&ActivateCodeService{h}, opts...)) } type activateCodeServiceHandler struct { ActivateCodeServiceHandler } func (h *activateCodeServiceHandler) AddActivateCode(ctx context.Context, in *AddActivateCodeReq, out *AddActivateCodeReply) error { return h.ActivateCodeServiceHandler.AddActivateCode(ctx, in, out) } func (h *activateCodeServiceHandler) ShowActivateCode(ctx context.Context, in *ShowActivateCodeReq, out *ActivateCodeDetail) error { return h.ActivateCodeServiceHandler.ShowActivateCode(ctx, in, out) } func (h *activateCodeServiceHandler) Active(ctx context.Context, in *ActiveReq, out *ActiveReply) error { return h.ActivateCodeServiceHandler.Active(ctx, in, out) } func (h *activateCodeServiceHandler) GetAllActivateCode(ctx context.Context, in *GetAllActivateCodeReq, out *GetAllActivateCodeResp) error { return h.ActivateCodeServiceHandler.GetAllActivateCode(ctx, in, out) }