Documentation
¶
Overview ¶
Package example is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error
- func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetAge() int32
- func (x *CreateUserRequest) GetName() string
- func (x *CreateUserRequest) GetUserId() int32
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- type CreateUserResponse
- func (*CreateUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserResponse) GetStatus() *Status
- func (x *CreateUserResponse) GetUser() *User
- func (*CreateUserResponse) ProtoMessage()
- func (x *CreateUserResponse) ProtoReflect() protoreflect.Message
- func (x *CreateUserResponse) Reset()
- func (x *CreateUserResponse) String() string
- type DeleteUserRequest
- func (*DeleteUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteUserRequest) GetId() int32
- func (x *DeleteUserRequest) GetUserId() int32
- func (*DeleteUserRequest) ProtoMessage()
- func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteUserRequest) Reset()
- func (x *DeleteUserRequest) String() string
- type DeleteUserResponse
- func (*DeleteUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteUserResponse) GetStatus() *Status
- func (*DeleteUserResponse) ProtoMessage()
- func (x *DeleteUserResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteUserResponse) Reset()
- func (x *DeleteUserResponse) String() string
- type GetUserRequest
- func (*GetUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserRequest) GetId() int32
- func (x *GetUserRequest) GetUserId() int32
- func (*GetUserRequest) ProtoMessage()
- func (x *GetUserRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserRequest) Reset()
- func (x *GetUserRequest) String() string
- type GetUserResponse
- func (*GetUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserResponse) GetStatus() *Status
- func (x *GetUserResponse) GetUser() *User
- func (*GetUserResponse) ProtoMessage()
- func (x *GetUserResponse) ProtoReflect() protoreflect.Message
- func (x *GetUserResponse) Reset()
- func (x *GetUserResponse) String() string
- type GetUsersRequest
- func (*GetUsersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUsersRequest) GetAge() int32
- func (x *GetUsersRequest) GetName() string
- func (x *GetUsersRequest) GetUserId() int32
- func (*GetUsersRequest) ProtoMessage()
- func (x *GetUsersRequest) ProtoReflect() protoreflect.Message
- func (x *GetUsersRequest) Reset()
- func (x *GetUsersRequest) String() string
- type GetUsersResponse
- func (*GetUsersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUsersResponse) GetStatus() *Status
- func (x *GetUsersResponse) GetUser() *User
- func (*GetUsersResponse) ProtoMessage()
- func (x *GetUsersResponse) ProtoReflect() protoreflect.Message
- func (x *GetUsersResponse) Reset()
- func (x *GetUsersResponse) String() string
- type Status
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
- func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)
- func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
- func (UnimplementedUserServiceServer) GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error)
- func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error)
- type UnsafeUserServiceServer
- type UpdateUserRequest
- func (*UpdateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserRequest) GetAge() int32
- func (x *UpdateUserRequest) GetId() int32
- func (x *UpdateUserRequest) GetName() string
- func (x *UpdateUserRequest) GetUserId() int32
- func (*UpdateUserRequest) ProtoMessage()
- func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateUserRequest) Reset()
- func (x *UpdateUserRequest) String() string
- type UpdateUserResponse
- func (*UpdateUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserResponse) GetStatus() *Status
- func (x *UpdateUserResponse) GetUser() *User
- func (*UpdateUserResponse) ProtoMessage()
- func (x *UpdateUserResponse) ProtoReflect() protoreflect.Message
- func (x *UpdateUserResponse) Reset()
- func (x *UpdateUserResponse) String() string
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAge() int32
- func (x *User) GetId() int32
- func (x *User) GetName() string
- func (x *User) GetUserId() int32
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserServiceClient
- type UserServiceServer
Constants ¶
const ( UserService_GetUsers_FullMethodName = "/example.UserService/GetUsers" UserService_GetUser_FullMethodName = "/example.UserService/GetUser" UserService_CreateUser_FullMethodName = "/example.UserService/CreateUser" UserService_UpdateUser_FullMethodName = "/example.UserService/UpdateUser" UserService_DeleteUser_FullMethodName = "/example.UserService/DeleteUser" )
Variables ¶
var File_example_example_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "example.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetUsers", Handler: _UserService_GetUsers_Handler, }, { MethodName: "GetUser", Handler: _UserService_GetUser_Handler, }, { MethodName: "CreateUser", Handler: _UserService_CreateUser_Handler, }, { MethodName: "UpdateUser", Handler: _UserService_UpdateUser_Handler, }, { MethodName: "DeleteUser", Handler: _UserService_DeleteUser_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "example/example.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserServiceHandler ¶
func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterUserServiceHandler registers the http handlers for service UserService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUserServiceHandlerClient ¶
func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error
RegisterUserServiceHandlerClient registers the http handlers for service UserService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UserServiceClient" to call the correct interceptors.
func RegisterUserServiceHandlerFromEndpoint ¶
func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUserServiceHandlerFromEndpoint is same as RegisterUserServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUserServiceHandlerServer ¶
func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error
RegisterUserServiceHandlerServer registers the http handlers for service UserService to "mux". UnaryRPC :call UserServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUserServiceHandlerFromEndpoint instead.
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct {
UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Age int32 `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"`
// contains filtered or unexported fields
}
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetAge ¶
func (x *CreateUserRequest) GetAge() int32
func (*CreateUserRequest) GetName ¶
func (x *CreateUserRequest) GetName() string
func (*CreateUserRequest) GetUserId ¶
func (x *CreateUserRequest) GetUserId() int32
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) ProtoReflect ¶
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
func (*CreateUserRequest) Reset ¶
func (x *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (x *CreateUserRequest) String() string
type CreateUserResponse ¶
type CreateUserResponse struct {
Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
// contains filtered or unexported fields
}
func (*CreateUserResponse) Descriptor
deprecated
func (*CreateUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserResponse.ProtoReflect.Descriptor instead.
func (*CreateUserResponse) GetStatus ¶
func (x *CreateUserResponse) GetStatus() *Status
func (*CreateUserResponse) GetUser ¶
func (x *CreateUserResponse) GetUser() *User
func (*CreateUserResponse) ProtoMessage ¶
func (*CreateUserResponse) ProtoMessage()
func (*CreateUserResponse) ProtoReflect ¶
func (x *CreateUserResponse) ProtoReflect() protoreflect.Message
func (*CreateUserResponse) Reset ¶
func (x *CreateUserResponse) Reset()
func (*CreateUserResponse) String ¶
func (x *CreateUserResponse) String() string
type DeleteUserRequest ¶
type DeleteUserRequest struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
UserId int32 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
// contains filtered or unexported fields
}
func (*DeleteUserRequest) Descriptor
deprecated
func (*DeleteUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserRequest) GetId ¶
func (x *DeleteUserRequest) GetId() int32
func (*DeleteUserRequest) GetUserId ¶
func (x *DeleteUserRequest) GetUserId() int32
func (*DeleteUserRequest) ProtoMessage ¶
func (*DeleteUserRequest) ProtoMessage()
func (*DeleteUserRequest) ProtoReflect ¶
func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message
func (*DeleteUserRequest) Reset ¶
func (x *DeleteUserRequest) Reset()
func (*DeleteUserRequest) String ¶
func (x *DeleteUserRequest) String() string
type DeleteUserResponse ¶
type DeleteUserResponse struct {
Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
// contains filtered or unexported fields
}
func (*DeleteUserResponse) Descriptor
deprecated
func (*DeleteUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserResponse.ProtoReflect.Descriptor instead.
func (*DeleteUserResponse) GetStatus ¶
func (x *DeleteUserResponse) GetStatus() *Status
func (*DeleteUserResponse) ProtoMessage ¶
func (*DeleteUserResponse) ProtoMessage()
func (*DeleteUserResponse) ProtoReflect ¶
func (x *DeleteUserResponse) ProtoReflect() protoreflect.Message
func (*DeleteUserResponse) Reset ¶
func (x *DeleteUserResponse) Reset()
func (*DeleteUserResponse) String ¶
func (x *DeleteUserResponse) String() string
type GetUserRequest ¶
type GetUserRequest struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
UserId int32 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserRequest) Descriptor
deprecated
func (*GetUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) GetId ¶
func (x *GetUserRequest) GetId() int32
func (*GetUserRequest) GetUserId ¶
func (x *GetUserRequest) GetUserId() int32
func (*GetUserRequest) ProtoMessage ¶
func (*GetUserRequest) ProtoMessage()
func (*GetUserRequest) ProtoReflect ¶
func (x *GetUserRequest) ProtoReflect() protoreflect.Message
func (*GetUserRequest) Reset ¶
func (x *GetUserRequest) Reset()
func (*GetUserRequest) String ¶
func (x *GetUserRequest) String() string
type GetUserResponse ¶
type GetUserResponse struct {
Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
// contains filtered or unexported fields
}
func (*GetUserResponse) Descriptor
deprecated
func (*GetUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserResponse.ProtoReflect.Descriptor instead.
func (*GetUserResponse) GetStatus ¶
func (x *GetUserResponse) GetStatus() *Status
func (*GetUserResponse) GetUser ¶
func (x *GetUserResponse) GetUser() *User
func (*GetUserResponse) ProtoMessage ¶
func (*GetUserResponse) ProtoMessage()
func (*GetUserResponse) ProtoReflect ¶
func (x *GetUserResponse) ProtoReflect() protoreflect.Message
func (*GetUserResponse) Reset ¶
func (x *GetUserResponse) Reset()
func (*GetUserResponse) String ¶
func (x *GetUserResponse) String() string
type GetUsersRequest ¶
type GetUsersRequest struct {
UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Age int32 `protobuf:"varint,3,opt,name=age,proto3" json:"age,omitempty"`
// contains filtered or unexported fields
}
func (*GetUsersRequest) Descriptor
deprecated
func (*GetUsersRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUsersRequest.ProtoReflect.Descriptor instead.
func (*GetUsersRequest) GetAge ¶
func (x *GetUsersRequest) GetAge() int32
func (*GetUsersRequest) GetName ¶
func (x *GetUsersRequest) GetName() string
func (*GetUsersRequest) GetUserId ¶
func (x *GetUsersRequest) GetUserId() int32
func (*GetUsersRequest) ProtoMessage ¶
func (*GetUsersRequest) ProtoMessage()
func (*GetUsersRequest) ProtoReflect ¶
func (x *GetUsersRequest) ProtoReflect() protoreflect.Message
func (*GetUsersRequest) Reset ¶
func (x *GetUsersRequest) Reset()
func (*GetUsersRequest) String ¶
func (x *GetUsersRequest) String() string
type GetUsersResponse ¶
type GetUsersResponse struct {
Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
// contains filtered or unexported fields
}
func (*GetUsersResponse) Descriptor
deprecated
func (*GetUsersResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUsersResponse.ProtoReflect.Descriptor instead.
func (*GetUsersResponse) GetStatus ¶
func (x *GetUsersResponse) GetStatus() *Status
func (*GetUsersResponse) GetUser ¶
func (x *GetUsersResponse) GetUser() *User
func (*GetUsersResponse) ProtoMessage ¶
func (*GetUsersResponse) ProtoMessage()
func (*GetUsersResponse) ProtoReflect ¶
func (x *GetUsersResponse) ProtoReflect() protoreflect.Message
func (*GetUsersResponse) Reset ¶
func (x *GetUsersResponse) Reset()
func (*GetUsersResponse) String ¶
func (x *GetUsersResponse) String() string
type Status ¶
type Status struct {
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
// contains filtered or unexported fields
}
func (*Status) Descriptor
deprecated
func (*Status) ProtoMessage ¶
func (*Status) ProtoMessage()
func (*Status) ProtoReflect ¶
func (x *Status) ProtoReflect() protoreflect.Message
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct {
}
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) CreateUser ¶
func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
func (UnimplementedUserServiceServer) DeleteUser ¶
func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*DeleteUserResponse, error)
func (UnimplementedUserServiceServer) GetUser ¶
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*GetUserResponse, error)
func (UnimplementedUserServiceServer) GetUsers ¶
func (UnimplementedUserServiceServer) GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, error)
func (UnimplementedUserServiceServer) UpdateUser ¶
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*UpdateUserResponse, error)
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type UpdateUserRequest ¶
type UpdateUserRequest struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
UserId int32 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Age int32 `protobuf:"varint,4,opt,name=age,proto3" json:"age,omitempty"`
// contains filtered or unexported fields
}
func (*UpdateUserRequest) Descriptor
deprecated
func (*UpdateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserRequest) GetAge ¶
func (x *UpdateUserRequest) GetAge() int32
func (*UpdateUserRequest) GetId ¶
func (x *UpdateUserRequest) GetId() int32
func (*UpdateUserRequest) GetName ¶
func (x *UpdateUserRequest) GetName() string
func (*UpdateUserRequest) GetUserId ¶
func (x *UpdateUserRequest) GetUserId() int32
func (*UpdateUserRequest) ProtoMessage ¶
func (*UpdateUserRequest) ProtoMessage()
func (*UpdateUserRequest) ProtoReflect ¶
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
func (*UpdateUserRequest) Reset ¶
func (x *UpdateUserRequest) Reset()
func (*UpdateUserRequest) String ¶
func (x *UpdateUserRequest) String() string
type UpdateUserResponse ¶
type UpdateUserResponse struct {
Status *Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"`
// contains filtered or unexported fields
}
func (*UpdateUserResponse) Descriptor
deprecated
func (*UpdateUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserResponse.ProtoReflect.Descriptor instead.
func (*UpdateUserResponse) GetStatus ¶
func (x *UpdateUserResponse) GetStatus() *Status
func (*UpdateUserResponse) GetUser ¶
func (x *UpdateUserResponse) GetUser() *User
func (*UpdateUserResponse) ProtoMessage ¶
func (*UpdateUserResponse) ProtoMessage()
func (*UpdateUserResponse) ProtoReflect ¶
func (x *UpdateUserResponse) ProtoReflect() protoreflect.Message
func (*UpdateUserResponse) Reset ¶
func (x *UpdateUserResponse) Reset()
func (*UpdateUserResponse) String ¶
func (x *UpdateUserResponse) String() string
type User ¶
type User struct {
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
UserId int32 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Age int32 `protobuf:"varint,4,opt,name=age,proto3" json:"age,omitempty"`
// contains filtered or unexported fields
}
func (*User) Descriptor
deprecated
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserServiceClient ¶
type UserServiceClient interface {
GetUsers(ctx context.Context, in *GetUsersRequest, opts ...grpc.CallOption) (*GetUsersResponse, error)
GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*UpdateUserResponse, error)
DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*DeleteUserResponse, error)
}
UserServiceClient is the client API for UserService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface {
GetUsers(context.Context, *GetUsersRequest) (*GetUsersResponse, 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)
// contains filtered or unexported methods
}
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility