Documentation ¶
Overview ¶
Package gen is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterUserHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUserHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserClient) error
- func RegisterUserHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUserHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServer) error
- func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
- type GetUserEmailRequest
- func (*GetUserEmailRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserEmailRequest) GetUserUuid() string
- func (*GetUserEmailRequest) ProtoMessage()
- func (x *GetUserEmailRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserEmailRequest) Reset()
- func (x *GetUserEmailRequest) String() string
- type GetUserEmailResponse
- func (*GetUserEmailResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserEmailResponse) GetEmail() string
- func (*GetUserEmailResponse) ProtoMessage()
- func (x *GetUserEmailResponse) ProtoReflect() protoreflect.Message
- func (x *GetUserEmailResponse) Reset()
- func (x *GetUserEmailResponse) String() string
- type UnimplementedUserServer
- type UnsafeUserServer
- type UserClient
- type UserServer
Constants ¶
This section is empty.
Variables ¶
var File_common_proto protoreflect.FileDescriptor
var File_user_proto protoreflect.FileDescriptor
var User_ServiceDesc = grpc.ServiceDesc{ ServiceName: "go.taskapplication.proto.userapi.User", HandlerType: (*UserServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetUserEmail", Handler: _User_GetUserEmail_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user.proto", }
User_ServiceDesc is the grpc.ServiceDesc for User service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserHandler ¶
RegisterUserHandler registers the http handlers for service User to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUserHandlerClient ¶
RegisterUserHandlerClient registers the http handlers for service User to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UserClient" to call the correct interceptors.
func RegisterUserHandlerFromEndpoint ¶
func RegisterUserHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUserHandlerFromEndpoint is same as RegisterUserHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUserHandlerServer ¶
RegisterUserHandlerServer registers the http handlers for service User to "mux". UnaryRPC :call UserServer 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 RegisterUserHandlerFromEndpoint instead.
func RegisterUserServer ¶
func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)
Types ¶
type GetUserEmailRequest ¶
type GetUserEmailRequest struct { UserUuid string `protobuf:"bytes,1,opt,name=user_uuid,json=userUuid,proto3" json:"user_uuid,omitempty"` // contains filtered or unexported fields }
func (*GetUserEmailRequest) Descriptor
deprecated
func (*GetUserEmailRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserEmailRequest.ProtoReflect.Descriptor instead.
func (*GetUserEmailRequest) GetUserUuid ¶
func (x *GetUserEmailRequest) GetUserUuid() string
func (*GetUserEmailRequest) ProtoMessage ¶
func (*GetUserEmailRequest) ProtoMessage()
func (*GetUserEmailRequest) ProtoReflect ¶
func (x *GetUserEmailRequest) ProtoReflect() protoreflect.Message
func (*GetUserEmailRequest) Reset ¶
func (x *GetUserEmailRequest) Reset()
func (*GetUserEmailRequest) String ¶
func (x *GetUserEmailRequest) String() string
type GetUserEmailResponse ¶
type GetUserEmailResponse struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*GetUserEmailResponse) Descriptor
deprecated
func (*GetUserEmailResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetUserEmailResponse.ProtoReflect.Descriptor instead.
func (*GetUserEmailResponse) GetEmail ¶
func (x *GetUserEmailResponse) GetEmail() string
func (*GetUserEmailResponse) ProtoMessage ¶
func (*GetUserEmailResponse) ProtoMessage()
func (*GetUserEmailResponse) ProtoReflect ¶
func (x *GetUserEmailResponse) ProtoReflect() protoreflect.Message
func (*GetUserEmailResponse) Reset ¶
func (x *GetUserEmailResponse) Reset()
func (*GetUserEmailResponse) String ¶
func (x *GetUserEmailResponse) String() string
type UnimplementedUserServer ¶
type UnimplementedUserServer struct { }
UnimplementedUserServer should be embedded to have forward compatible implementations.
func (UnimplementedUserServer) GetUserEmail ¶
func (UnimplementedUserServer) GetUserEmail(context.Context, *GetUserEmailRequest) (*GetUserEmailResponse, error)
type UnsafeUserServer ¶
type UnsafeUserServer interface {
// contains filtered or unexported methods
}
UnsafeUserServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServer will result in compilation errors.
type UserClient ¶
type UserClient interface {
GetUserEmail(ctx context.Context, in *GetUserEmailRequest, opts ...grpc.CallOption) (*GetUserEmailResponse, error)
}
UserClient is the client API for User 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 NewUserClient ¶
func NewUserClient(cc grpc.ClientConnInterface) UserClient
type UserServer ¶
type UserServer interface {
GetUserEmail(context.Context, *GetUserEmailRequest) (*GetUserEmailResponse, error)
}
UserServer is the server API for User service. All implementations should embed UnimplementedUserServer for forward compatibility