123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- // Code generated by protoc-gen-micro. DO NOT EDIT.
- // source: proto/shopping_role_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 ShoppingRoleService service
- func NewShoppingRoleServiceEndpoints() []*api.Endpoint {
- return []*api.Endpoint{}
- }
- // Client API for ShoppingRoleService service
- type ShoppingRoleService interface {
- GetRoleList(ctx context.Context, in *GetRoleListRequest, opts ...client.CallOption) (*GetRoleListResponse, error)
- GetRole(ctx context.Context, in *GetRoleRequest, opts ...client.CallOption) (*GetRoleResponse, error)
- GetAllRoles(ctx context.Context, in *GetAllRolesRequest, opts ...client.CallOption) (*GetAllRolesResponse, error)
- CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...client.CallOption) (*CreateRoleResponse, error)
- UpdateRole(ctx context.Context, in *UpdateRoleRequest, opts ...client.CallOption) (*UpdateRoleResponse, error)
- DeleteRole(ctx context.Context, in *DeleteRoleRequest, opts ...client.CallOption) (*DeleteRoleResponse, error)
- ToggleRole(ctx context.Context, in *ToggleRoleRequest, opts ...client.CallOption) (*ToggleRoleResponse, error)
- }
- type shoppingRoleService struct {
- c client.Client
- name string
- }
- func NewShoppingRoleService(name string, c client.Client) ShoppingRoleService {
- return &shoppingRoleService{
- c: c,
- name: name,
- }
- }
- func (c *shoppingRoleService) GetRoleList(ctx context.Context, in *GetRoleListRequest, opts ...client.CallOption) (*GetRoleListResponse, error) {
- req := c.c.NewRequest(c.name, "ShoppingRoleService.GetRoleList", in)
- out := new(GetRoleListResponse)
- err := c.c.Call(ctx, req, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *shoppingRoleService) GetRole(ctx context.Context, in *GetRoleRequest, opts ...client.CallOption) (*GetRoleResponse, error) {
- req := c.c.NewRequest(c.name, "ShoppingRoleService.GetRole", in)
- out := new(GetRoleResponse)
- err := c.c.Call(ctx, req, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *shoppingRoleService) GetAllRoles(ctx context.Context, in *GetAllRolesRequest, opts ...client.CallOption) (*GetAllRolesResponse, error) {
- req := c.c.NewRequest(c.name, "ShoppingRoleService.GetAllRoles", in)
- out := new(GetAllRolesResponse)
- err := c.c.Call(ctx, req, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *shoppingRoleService) CreateRole(ctx context.Context, in *CreateRoleRequest, opts ...client.CallOption) (*CreateRoleResponse, error) {
- req := c.c.NewRequest(c.name, "ShoppingRoleService.CreateRole", in)
- out := new(CreateRoleResponse)
- err := c.c.Call(ctx, req, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *shoppingRoleService) UpdateRole(ctx context.Context, in *UpdateRoleRequest, opts ...client.CallOption) (*UpdateRoleResponse, error) {
- req := c.c.NewRequest(c.name, "ShoppingRoleService.UpdateRole", in)
- out := new(UpdateRoleResponse)
- err := c.c.Call(ctx, req, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *shoppingRoleService) DeleteRole(ctx context.Context, in *DeleteRoleRequest, opts ...client.CallOption) (*DeleteRoleResponse, error) {
- req := c.c.NewRequest(c.name, "ShoppingRoleService.DeleteRole", in)
- out := new(DeleteRoleResponse)
- err := c.c.Call(ctx, req, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *shoppingRoleService) ToggleRole(ctx context.Context, in *ToggleRoleRequest, opts ...client.CallOption) (*ToggleRoleResponse, error) {
- req := c.c.NewRequest(c.name, "ShoppingRoleService.ToggleRole", in)
- out := new(ToggleRoleResponse)
- err := c.c.Call(ctx, req, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // Server API for ShoppingRoleService service
- type ShoppingRoleServiceHandler interface {
- GetRoleList(context.Context, *GetRoleListRequest, *GetRoleListResponse) error
- GetRole(context.Context, *GetRoleRequest, *GetRoleResponse) error
- GetAllRoles(context.Context, *GetAllRolesRequest, *GetAllRolesResponse) error
- CreateRole(context.Context, *CreateRoleRequest, *CreateRoleResponse) error
- UpdateRole(context.Context, *UpdateRoleRequest, *UpdateRoleResponse) error
- DeleteRole(context.Context, *DeleteRoleRequest, *DeleteRoleResponse) error
- ToggleRole(context.Context, *ToggleRoleRequest, *ToggleRoleResponse) error
- }
- func RegisterShoppingRoleServiceHandler(s server.Server, hdlr ShoppingRoleServiceHandler, opts ...server.HandlerOption) error {
- type shoppingRoleService interface {
- GetRoleList(ctx context.Context, in *GetRoleListRequest, out *GetRoleListResponse) error
- GetRole(ctx context.Context, in *GetRoleRequest, out *GetRoleResponse) error
- GetAllRoles(ctx context.Context, in *GetAllRolesRequest, out *GetAllRolesResponse) error
- CreateRole(ctx context.Context, in *CreateRoleRequest, out *CreateRoleResponse) error
- UpdateRole(ctx context.Context, in *UpdateRoleRequest, out *UpdateRoleResponse) error
- DeleteRole(ctx context.Context, in *DeleteRoleRequest, out *DeleteRoleResponse) error
- ToggleRole(ctx context.Context, in *ToggleRoleRequest, out *ToggleRoleResponse) error
- }
- type ShoppingRoleService struct {
- shoppingRoleService
- }
- h := &shoppingRoleServiceHandler{hdlr}
- return s.Handle(s.NewHandler(&ShoppingRoleService{h}, opts...))
- }
- type shoppingRoleServiceHandler struct {
- ShoppingRoleServiceHandler
- }
- func (h *shoppingRoleServiceHandler) GetRoleList(ctx context.Context, in *GetRoleListRequest, out *GetRoleListResponse) error {
- return h.ShoppingRoleServiceHandler.GetRoleList(ctx, in, out)
- }
- func (h *shoppingRoleServiceHandler) GetRole(ctx context.Context, in *GetRoleRequest, out *GetRoleResponse) error {
- return h.ShoppingRoleServiceHandler.GetRole(ctx, in, out)
- }
- func (h *shoppingRoleServiceHandler) GetAllRoles(ctx context.Context, in *GetAllRolesRequest, out *GetAllRolesResponse) error {
- return h.ShoppingRoleServiceHandler.GetAllRoles(ctx, in, out)
- }
- func (h *shoppingRoleServiceHandler) CreateRole(ctx context.Context, in *CreateRoleRequest, out *CreateRoleResponse) error {
- return h.ShoppingRoleServiceHandler.CreateRole(ctx, in, out)
- }
- func (h *shoppingRoleServiceHandler) UpdateRole(ctx context.Context, in *UpdateRoleRequest, out *UpdateRoleResponse) error {
- return h.ShoppingRoleServiceHandler.UpdateRole(ctx, in, out)
- }
- func (h *shoppingRoleServiceHandler) DeleteRole(ctx context.Context, in *DeleteRoleRequest, out *DeleteRoleResponse) error {
- return h.ShoppingRoleServiceHandler.DeleteRole(ctx, in, out)
- }
- func (h *shoppingRoleServiceHandler) ToggleRole(ctx context.Context, in *ToggleRoleRequest, out *ToggleRoleResponse) error {
- return h.ShoppingRoleServiceHandler.ToggleRole(ctx, in, out)
- }
|