// Code generated by protoc-gen-micro. DO NOT EDIT. // source: proto/shopping_category_service.proto package shopping_service import ( fmt "fmt" proto "google.golang.org/protobuf/proto" math "math" ) import ( context "context" api "go-micro.dev/v4/api" client "go-micro.dev/v4/client" server "go-micro.dev/v4/server" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf // Reference imports to suppress errors if they are not otherwise used. var _ api.Endpoint var _ context.Context var _ client.Option var _ server.Option // Api Endpoints for ShoppingCategoryService service func NewShoppingCategoryServiceEndpoints() []*api.Endpoint { return []*api.Endpoint{} } // Client API for ShoppingCategoryService service type ShoppingCategoryService interface { GetCategoryList(ctx context.Context, in *GetCategoryListRequest, opts ...client.CallOption) (*GetCategoryListResponse, error) // rpc GetCategory(GetCategoryRequest) returns(base_shopping_service.Category); GetAllCategories(ctx context.Context, in *GetAllCategoriesRequest, opts ...client.CallOption) (*GetAllCategoriesResponse, error) CreateCategory(ctx context.Context, in *CreateCategoryRequest, opts ...client.CallOption) (*CreateCategoryResponse, error) // rpc UpdateCategory(UpdateCategoryRequest) returns(UpdateCategoryResponse); DeleteCategory(ctx context.Context, in *DeleteCategoryRequest, opts ...client.CallOption) (*DeleteCategoryResponse, error) } type shoppingCategoryService struct { c client.Client name string } func NewShoppingCategoryService(name string, c client.Client) ShoppingCategoryService { return &shoppingCategoryService{ c: c, name: name, } } func (c *shoppingCategoryService) GetCategoryList(ctx context.Context, in *GetCategoryListRequest, opts ...client.CallOption) (*GetCategoryListResponse, error) { req := c.c.NewRequest(c.name, "ShoppingCategoryService.GetCategoryList", in) out := new(GetCategoryListResponse) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *shoppingCategoryService) GetAllCategories(ctx context.Context, in *GetAllCategoriesRequest, opts ...client.CallOption) (*GetAllCategoriesResponse, error) { req := c.c.NewRequest(c.name, "ShoppingCategoryService.GetAllCategories", in) out := new(GetAllCategoriesResponse) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *shoppingCategoryService) CreateCategory(ctx context.Context, in *CreateCategoryRequest, opts ...client.CallOption) (*CreateCategoryResponse, error) { req := c.c.NewRequest(c.name, "ShoppingCategoryService.CreateCategory", in) out := new(CreateCategoryResponse) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *shoppingCategoryService) DeleteCategory(ctx context.Context, in *DeleteCategoryRequest, opts ...client.CallOption) (*DeleteCategoryResponse, error) { req := c.c.NewRequest(c.name, "ShoppingCategoryService.DeleteCategory", in) out := new(DeleteCategoryResponse) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for ShoppingCategoryService service type ShoppingCategoryServiceHandler interface { GetCategoryList(context.Context, *GetCategoryListRequest, *GetCategoryListResponse) error // rpc GetCategory(GetCategoryRequest) returns(base_shopping_service.Category); GetAllCategories(context.Context, *GetAllCategoriesRequest, *GetAllCategoriesResponse) error CreateCategory(context.Context, *CreateCategoryRequest, *CreateCategoryResponse) error // rpc UpdateCategory(UpdateCategoryRequest) returns(UpdateCategoryResponse); DeleteCategory(context.Context, *DeleteCategoryRequest, *DeleteCategoryResponse) error } func RegisterShoppingCategoryServiceHandler(s server.Server, hdlr ShoppingCategoryServiceHandler, opts ...server.HandlerOption) error { type shoppingCategoryService interface { GetCategoryList(ctx context.Context, in *GetCategoryListRequest, out *GetCategoryListResponse) error GetAllCategories(ctx context.Context, in *GetAllCategoriesRequest, out *GetAllCategoriesResponse) error CreateCategory(ctx context.Context, in *CreateCategoryRequest, out *CreateCategoryResponse) error DeleteCategory(ctx context.Context, in *DeleteCategoryRequest, out *DeleteCategoryResponse) error } type ShoppingCategoryService struct { shoppingCategoryService } h := &shoppingCategoryServiceHandler{hdlr} return s.Handle(s.NewHandler(&ShoppingCategoryService{h}, opts...)) } type shoppingCategoryServiceHandler struct { ShoppingCategoryServiceHandler } func (h *shoppingCategoryServiceHandler) GetCategoryList(ctx context.Context, in *GetCategoryListRequest, out *GetCategoryListResponse) error { return h.ShoppingCategoryServiceHandler.GetCategoryList(ctx, in, out) } func (h *shoppingCategoryServiceHandler) GetAllCategories(ctx context.Context, in *GetAllCategoriesRequest, out *GetAllCategoriesResponse) error { return h.ShoppingCategoryServiceHandler.GetAllCategories(ctx, in, out) } func (h *shoppingCategoryServiceHandler) CreateCategory(ctx context.Context, in *CreateCategoryRequest, out *CreateCategoryResponse) error { return h.ShoppingCategoryServiceHandler.CreateCategory(ctx, in, out) } func (h *shoppingCategoryServiceHandler) DeleteCategory(ctx context.Context, in *DeleteCategoryRequest, out *DeleteCategoryResponse) error { return h.ShoppingCategoryServiceHandler.DeleteCategory(ctx, in, out) }