Documentation ¶
Overview ¶
Package signupv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterSignupServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSignupServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SignupServiceClient) error
- func RegisterSignupServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSignupServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SignupServiceServer) error
- func RegisterSignupServiceServer(s grpc.ServiceRegistrar, srv SignupServiceServer)
- type SignupRequest
- type SignupResponse
- type SignupServiceClient
- type SignupServiceServer
- type UnimplementedSignupServiceServer
- type UnsafeSignupServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetEmail() string
- func (x *User) GetFirstName() string
- func (x *User) GetId() string
- func (x *User) GetLastName() string
- func (x *User) GetPassword() string
- func (x *User) GetRole() string
- func (x *User) GetUsername() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
Constants ¶
This section is empty.
Variables ¶
var File_signup_service_proto protoreflect.FileDescriptor
var File_users_message_proto protoreflect.FileDescriptor
var SignupService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "SignupService", HandlerType: (*SignupServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Signup", Handler: _SignupService_Signup_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "signup_service.proto", }
SignupService_ServiceDesc is the grpc.ServiceDesc for SignupService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSignupServiceHandler ¶
func RegisterSignupServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterSignupServiceHandler registers the http handlers for service SignupService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSignupServiceHandlerClient ¶
func RegisterSignupServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SignupServiceClient) error
RegisterSignupServiceHandlerClient registers the http handlers for service SignupService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SignupServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SignupServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SignupServiceClient" to call the correct interceptors.
func RegisterSignupServiceHandlerFromEndpoint ¶
func RegisterSignupServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSignupServiceHandlerFromEndpoint is same as RegisterSignupServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSignupServiceHandlerServer ¶
func RegisterSignupServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SignupServiceServer) error
RegisterSignupServiceHandlerServer registers the http handlers for service SignupService to "mux". UnaryRPC :call SignupServiceServer 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 RegisterSignupServiceHandlerFromEndpoint instead.
func RegisterSignupServiceServer ¶
func RegisterSignupServiceServer(s grpc.ServiceRegistrar, srv SignupServiceServer)
Types ¶
type SignupRequest ¶
type SignupRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*SignupRequest) Descriptor
deprecated
func (*SignupRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignupRequest.ProtoReflect.Descriptor instead.
func (*SignupRequest) GetUser ¶
func (x *SignupRequest) GetUser() *User
func (*SignupRequest) ProtoMessage ¶
func (*SignupRequest) ProtoMessage()
func (*SignupRequest) ProtoReflect ¶
func (x *SignupRequest) ProtoReflect() protoreflect.Message
func (*SignupRequest) Reset ¶
func (x *SignupRequest) Reset()
func (*SignupRequest) String ¶
func (x *SignupRequest) String() string
type SignupResponse ¶
type SignupResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*SignupResponse) Descriptor
deprecated
func (*SignupResponse) Descriptor() ([]byte, []int)
Deprecated: Use SignupResponse.ProtoReflect.Descriptor instead.
func (*SignupResponse) GetToken ¶
func (x *SignupResponse) GetToken() string
func (*SignupResponse) ProtoMessage ¶
func (*SignupResponse) ProtoMessage()
func (*SignupResponse) ProtoReflect ¶
func (x *SignupResponse) ProtoReflect() protoreflect.Message
func (*SignupResponse) Reset ¶
func (x *SignupResponse) Reset()
func (*SignupResponse) String ¶
func (x *SignupResponse) String() string
type SignupServiceClient ¶
type SignupServiceClient interface {
Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponse, error)
}
SignupServiceClient is the client API for SignupService 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 NewSignupServiceClient ¶
func NewSignupServiceClient(cc grpc.ClientConnInterface) SignupServiceClient
type SignupServiceServer ¶
type SignupServiceServer interface { Signup(context.Context, *SignupRequest) (*SignupResponse, error) // contains filtered or unexported methods }
SignupServiceServer is the server API for SignupService service. All implementations must embed UnimplementedSignupServiceServer for forward compatibility
type UnimplementedSignupServiceServer ¶
type UnimplementedSignupServiceServer struct { }
UnimplementedSignupServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedSignupServiceServer) Signup ¶
func (UnimplementedSignupServiceServer) Signup(context.Context, *SignupRequest) (*SignupResponse, error)
type UnsafeSignupServiceServer ¶
type UnsafeSignupServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSignupServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SignupServiceServer will result in compilation errors.
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` FirstName string `protobuf:"bytes,2,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` LastName string `protobuf:"bytes,3,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"` Email string `protobuf:"bytes,5,opt,name=email,proto3" json:"email,omitempty"` Password string `protobuf:"bytes,7,opt,name=password,proto3" json:"password,omitempty"` Role string `protobuf:"bytes,8,opt,name=role,proto3" json:"role,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetFirstName ¶
func (*User) GetLastName ¶
func (*User) GetPassword ¶
func (*User) GetUsername ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message