// Code generated by protoc-gen-micro. DO NOT EDIT. // source: proto/shopping_user_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 ShoppingUserService service func NewShoppingUserServiceEndpoints() []*api.Endpoint { return []*api.Endpoint{} } // Client API for ShoppingUserService service type ShoppingUserService interface { GetUserList(ctx context.Context, in *GetUserListRequest, opts ...client.CallOption) (*GetUserListResponse, error) GetUser(ctx context.Context, in *GetUserRequest, opts ...client.CallOption) (*GetUserResponse, error) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...client.CallOption) (*CreateUserResponse, error) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...client.CallOption) (*UpdateUserResponse, error) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...client.CallOption) (*DeleteUserResponse, error) ToggleUser(ctx context.Context, in *ToggleUserRequest, opts ...client.CallOption) (*ToggleUserResponse, error) } type shoppingUserService struct { c client.Client name string } func NewShoppingUserService(name string, c client.Client) ShoppingUserService { return &shoppingUserService{ c: c, name: name, } } func (c *shoppingUserService) GetUserList(ctx context.Context, in *GetUserListRequest, opts ...client.CallOption) (*GetUserListResponse, error) { req := c.c.NewRequest(c.name, "ShoppingUserService.GetUserList", in) out := new(GetUserListResponse) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *shoppingUserService) GetUser(ctx context.Context, in *GetUserRequest, opts ...client.CallOption) (*GetUserResponse, error) { req := c.c.NewRequest(c.name, "ShoppingUserService.GetUser", in) out := new(GetUserResponse) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *shoppingUserService) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...client.CallOption) (*CreateUserResponse, error) { req := c.c.NewRequest(c.name, "ShoppingUserService.CreateUser", in) out := new(CreateUserResponse) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *shoppingUserService) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...client.CallOption) (*UpdateUserResponse, error) { req := c.c.NewRequest(c.name, "ShoppingUserService.UpdateUser", in) out := new(UpdateUserResponse) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *shoppingUserService) DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...client.CallOption) (*DeleteUserResponse, error) { req := c.c.NewRequest(c.name, "ShoppingUserService.DeleteUser", in) out := new(DeleteUserResponse) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } func (c *shoppingUserService) ToggleUser(ctx context.Context, in *ToggleUserRequest, opts ...client.CallOption) (*ToggleUserResponse, error) { req := c.c.NewRequest(c.name, "ShoppingUserService.ToggleUser", in) out := new(ToggleUserResponse) err := c.c.Call(ctx, req, out, opts...) if err != nil { return nil, err } return out, nil } // Server API for ShoppingUserService service type ShoppingUserServiceHandler interface { GetUserList(context.Context, *GetUserListRequest, *GetUserListResponse) error GetUser(context.Context, *GetUserRequest, *GetUserResponse) error CreateUser(context.Context, *CreateUserRequest, *CreateUserResponse) error UpdateUser(context.Context, *UpdateUserRequest, *UpdateUserResponse) error DeleteUser(context.Context, *DeleteUserRequest, *DeleteUserResponse) error ToggleUser(context.Context, *ToggleUserRequest, *ToggleUserResponse) error } func RegisterShoppingUserServiceHandler(s server.Server, hdlr ShoppingUserServiceHandler, opts ...server.HandlerOption) error { type shoppingUserService interface { GetUserList(ctx context.Context, in *GetUserListRequest, out *GetUserListResponse) error GetUser(ctx context.Context, in *GetUserRequest, out *GetUserResponse) error CreateUser(ctx context.Context, in *CreateUserRequest, out *CreateUserResponse) error UpdateUser(ctx context.Context, in *UpdateUserRequest, out *UpdateUserResponse) error DeleteUser(ctx context.Context, in *DeleteUserRequest, out *DeleteUserResponse) error ToggleUser(ctx context.Context, in *ToggleUserRequest, out *ToggleUserResponse) error } type ShoppingUserService struct { shoppingUserService } h := &shoppingUserServiceHandler{hdlr} return s.Handle(s.NewHandler(&ShoppingUserService{h}, opts...)) } type shoppingUserServiceHandler struct { ShoppingUserServiceHandler } func (h *shoppingUserServiceHandler) GetUserList(ctx context.Context, in *GetUserListRequest, out *GetUserListResponse) error { return h.ShoppingUserServiceHandler.GetUserList(ctx, in, out) } func (h *shoppingUserServiceHandler) GetUser(ctx context.Context, in *GetUserRequest, out *GetUserResponse) error { return h.ShoppingUserServiceHandler.GetUser(ctx, in, out) } func (h *shoppingUserServiceHandler) CreateUser(ctx context.Context, in *CreateUserRequest, out *CreateUserResponse) error { return h.ShoppingUserServiceHandler.CreateUser(ctx, in, out) } func (h *shoppingUserServiceHandler) UpdateUser(ctx context.Context, in *UpdateUserRequest, out *UpdateUserResponse) error { return h.ShoppingUserServiceHandler.UpdateUser(ctx, in, out) } func (h *shoppingUserServiceHandler) DeleteUser(ctx context.Context, in *DeleteUserRequest, out *DeleteUserResponse) error { return h.ShoppingUserServiceHandler.DeleteUser(ctx, in, out) } func (h *shoppingUserServiceHandler) ToggleUser(ctx context.Context, in *ToggleUserRequest, out *ToggleUserResponse) error { return h.ShoppingUserServiceHandler.ToggleUser(ctx, in, out) }