Documentation
¶
Overview ¶
Package authServicePb is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterAuthHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAuthHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AuthClient) error
- func RegisterAuthHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AuthServer) error
- func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
- type AuthClient
- type AuthServer
- type CodeVerificationRequest
- func (*CodeVerificationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CodeVerificationRequest) GetCode() string
- func (x *CodeVerificationRequest) GetSignUpToken() string
- func (*CodeVerificationRequest) ProtoMessage()
- func (x *CodeVerificationRequest) ProtoReflect() protoreflect.Message
- func (x *CodeVerificationRequest) Reset()
- func (x *CodeVerificationRequest) String() string
- type CodeVerificationResponse
- type ForgetPasswordFinalizeRequest
- func (*ForgetPasswordFinalizeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ForgetPasswordFinalizeRequest) GetNewPassword() string
- func (x *ForgetPasswordFinalizeRequest) GetResetToken() string
- func (*ForgetPasswordFinalizeRequest) ProtoMessage()
- func (x *ForgetPasswordFinalizeRequest) ProtoReflect() protoreflect.Message
- func (x *ForgetPasswordFinalizeRequest) Reset()
- func (x *ForgetPasswordFinalizeRequest) String() string
- type ForgetPasswordFinalizeResponse
- func (*ForgetPasswordFinalizeResponse) Descriptor() ([]byte, []int)deprecated
- func (*ForgetPasswordFinalizeResponse) ProtoMessage()
- func (x *ForgetPasswordFinalizeResponse) ProtoReflect() protoreflect.Message
- func (x *ForgetPasswordFinalizeResponse) Reset()
- func (x *ForgetPasswordFinalizeResponse) String() string
- type ForgetPasswordRequest
- func (*ForgetPasswordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ForgetPasswordRequest) GetEmail() string
- func (*ForgetPasswordRequest) ProtoMessage()
- func (x *ForgetPasswordRequest) ProtoReflect() protoreflect.Message
- func (x *ForgetPasswordRequest) Reset()
- func (x *ForgetPasswordRequest) String() string
- type ForgetPasswordResponse
- type LoginRequest
- func (*LoginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LoginRequest) GetPassword() string
- func (x *LoginRequest) GetUserNameOrEmail() string
- func (*LoginRequest) ProtoMessage()
- func (x *LoginRequest) ProtoReflect() protoreflect.Message
- func (x *LoginRequest) Reset()
- func (x *LoginRequest) String() string
- type LoginResponse
- func (*LoginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LoginResponse) GetJwtToken() string
- func (x *LoginResponse) GetRefreshToken() string
- func (*LoginResponse) ProtoMessage()
- func (x *LoginResponse) ProtoReflect() protoreflect.Message
- func (x *LoginResponse) Reset()
- func (x *LoginResponse) String() string
- type SignUpRequest
- func (*SignUpRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignUpRequest) GetEmail() string
- func (x *SignUpRequest) GetPassword() string
- func (x *SignUpRequest) GetUsername() string
- func (*SignUpRequest) ProtoMessage()
- func (x *SignUpRequest) ProtoReflect() protoreflect.Message
- func (x *SignUpRequest) Reset()
- func (x *SignUpRequest) String() string
- type SignUpResponse
- type UnimplementedAuthServer
- func (UnimplementedAuthServer) CodeVerification(context.Context, *CodeVerificationRequest) (*CodeVerificationResponse, error)
- func (UnimplementedAuthServer) ForgetPassword(context.Context, *ForgetPasswordRequest) (*ForgetPasswordResponse, error)
- func (UnimplementedAuthServer) ForgetPasswordFinalize(context.Context, *ForgetPasswordFinalizeRequest) (*ForgetPasswordFinalizeResponse, error)
- func (UnimplementedAuthServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
- func (UnimplementedAuthServer) SignUp(context.Context, *SignUpRequest) (*SignUpResponse, error)
- type UnsafeAuthServer
Constants ¶
const ( Auth_SignUp_FullMethodName = "/IdeYarAPI.Auth/SignUp" Auth_Login_FullMethodName = "/IdeYarAPI.Auth/Login" Auth_CodeVerification_FullMethodName = "/IdeYarAPI.Auth/CodeVerification" Auth_ForgetPassword_FullMethodName = "/IdeYarAPI.Auth/ForgetPassword" Auth_ForgetPasswordFinalize_FullMethodName = "/IdeYarAPI.Auth/ForgetPasswordFinalize" )
Variables ¶
var Auth_ServiceDesc = grpc.ServiceDesc{ ServiceName: "IdeYarAPI.Auth", HandlerType: (*AuthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SignUp", Handler: _Auth_SignUp_Handler, }, { MethodName: "Login", Handler: _Auth_Login_Handler, }, { MethodName: "CodeVerification", Handler: _Auth_CodeVerification_Handler, }, { MethodName: "ForgetPassword", Handler: _Auth_ForgetPassword_Handler, }, { MethodName: "ForgetPasswordFinalize", Handler: _Auth_ForgetPasswordFinalize_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/auth.proto", }
Auth_ServiceDesc is the grpc.ServiceDesc for Auth service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthHandler ¶
RegisterAuthHandler registers the http handlers for service Auth to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAuthHandlerClient ¶
RegisterAuthHandlerClient registers the http handlers for service Auth to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AuthClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AuthClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AuthClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterAuthHandlerFromEndpoint ¶
func RegisterAuthHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAuthHandlerFromEndpoint is same as RegisterAuthHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAuthHandlerServer ¶
RegisterAuthHandlerServer registers the http handlers for service Auth to "mux". UnaryRPC :call AuthServer 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 RegisterAuthHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterAuthServer ¶
func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
Types ¶
type AuthClient ¶
type AuthClient interface { SignUp(ctx context.Context, in *SignUpRequest, opts ...grpc.CallOption) (*SignUpResponse, error) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) CodeVerification(ctx context.Context, in *CodeVerificationRequest, opts ...grpc.CallOption) (*CodeVerificationResponse, error) ForgetPassword(ctx context.Context, in *ForgetPasswordRequest, opts ...grpc.CallOption) (*ForgetPasswordResponse, error) ForgetPasswordFinalize(ctx context.Context, in *ForgetPasswordFinalizeRequest, opts ...grpc.CallOption) (*ForgetPasswordFinalizeResponse, error) }
AuthClient is the client API for Auth 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 NewAuthClient ¶
func NewAuthClient(cc grpc.ClientConnInterface) AuthClient
type AuthServer ¶
type AuthServer interface { SignUp(context.Context, *SignUpRequest) (*SignUpResponse, error) Login(context.Context, *LoginRequest) (*LoginResponse, error) CodeVerification(context.Context, *CodeVerificationRequest) (*CodeVerificationResponse, error) ForgetPassword(context.Context, *ForgetPasswordRequest) (*ForgetPasswordResponse, error) ForgetPasswordFinalize(context.Context, *ForgetPasswordFinalizeRequest) (*ForgetPasswordFinalizeResponse, error) // contains filtered or unexported methods }
AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility.
type CodeVerificationRequest ¶
type CodeVerificationRequest struct { SignUpToken string `protobuf:"bytes,1,opt,name=signUpToken,proto3" json:"signUpToken,omitempty"` Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*CodeVerificationRequest) Descriptor
deprecated
func (*CodeVerificationRequest) Descriptor() ([]byte, []int)
Deprecated: Use CodeVerificationRequest.ProtoReflect.Descriptor instead.
func (*CodeVerificationRequest) GetCode ¶
func (x *CodeVerificationRequest) GetCode() string
func (*CodeVerificationRequest) GetSignUpToken ¶
func (x *CodeVerificationRequest) GetSignUpToken() string
func (*CodeVerificationRequest) ProtoMessage ¶
func (*CodeVerificationRequest) ProtoMessage()
func (*CodeVerificationRequest) ProtoReflect ¶
func (x *CodeVerificationRequest) ProtoReflect() protoreflect.Message
func (*CodeVerificationRequest) Reset ¶
func (x *CodeVerificationRequest) Reset()
func (*CodeVerificationRequest) String ¶
func (x *CodeVerificationRequest) String() string
type CodeVerificationResponse ¶
type CodeVerificationResponse struct {
// contains filtered or unexported fields
}
func (*CodeVerificationResponse) Descriptor
deprecated
func (*CodeVerificationResponse) Descriptor() ([]byte, []int)
Deprecated: Use CodeVerificationResponse.ProtoReflect.Descriptor instead.
func (*CodeVerificationResponse) ProtoMessage ¶
func (*CodeVerificationResponse) ProtoMessage()
func (*CodeVerificationResponse) ProtoReflect ¶
func (x *CodeVerificationResponse) ProtoReflect() protoreflect.Message
func (*CodeVerificationResponse) Reset ¶
func (x *CodeVerificationResponse) Reset()
func (*CodeVerificationResponse) String ¶
func (x *CodeVerificationResponse) String() string
type ForgetPasswordFinalizeRequest ¶
type ForgetPasswordFinalizeRequest struct { NewPassword string `protobuf:"bytes,1,opt,name=newPassword,proto3" json:"newPassword,omitempty"` ResetToken string `protobuf:"bytes,2,opt,name=resetToken,proto3" json:"resetToken,omitempty"` // contains filtered or unexported fields }
func (*ForgetPasswordFinalizeRequest) Descriptor
deprecated
func (*ForgetPasswordFinalizeRequest) Descriptor() ([]byte, []int)
Deprecated: Use ForgetPasswordFinalizeRequest.ProtoReflect.Descriptor instead.
func (*ForgetPasswordFinalizeRequest) GetNewPassword ¶
func (x *ForgetPasswordFinalizeRequest) GetNewPassword() string
func (*ForgetPasswordFinalizeRequest) GetResetToken ¶
func (x *ForgetPasswordFinalizeRequest) GetResetToken() string
func (*ForgetPasswordFinalizeRequest) ProtoMessage ¶
func (*ForgetPasswordFinalizeRequest) ProtoMessage()
func (*ForgetPasswordFinalizeRequest) ProtoReflect ¶
func (x *ForgetPasswordFinalizeRequest) ProtoReflect() protoreflect.Message
func (*ForgetPasswordFinalizeRequest) Reset ¶
func (x *ForgetPasswordFinalizeRequest) Reset()
func (*ForgetPasswordFinalizeRequest) String ¶
func (x *ForgetPasswordFinalizeRequest) String() string
type ForgetPasswordFinalizeResponse ¶
type ForgetPasswordFinalizeResponse struct {
// contains filtered or unexported fields
}
func (*ForgetPasswordFinalizeResponse) Descriptor
deprecated
func (*ForgetPasswordFinalizeResponse) Descriptor() ([]byte, []int)
Deprecated: Use ForgetPasswordFinalizeResponse.ProtoReflect.Descriptor instead.
func (*ForgetPasswordFinalizeResponse) ProtoMessage ¶
func (*ForgetPasswordFinalizeResponse) ProtoMessage()
func (*ForgetPasswordFinalizeResponse) ProtoReflect ¶
func (x *ForgetPasswordFinalizeResponse) ProtoReflect() protoreflect.Message
func (*ForgetPasswordFinalizeResponse) Reset ¶
func (x *ForgetPasswordFinalizeResponse) Reset()
func (*ForgetPasswordFinalizeResponse) String ¶
func (x *ForgetPasswordFinalizeResponse) String() string
type ForgetPasswordRequest ¶
type ForgetPasswordRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*ForgetPasswordRequest) Descriptor
deprecated
func (*ForgetPasswordRequest) Descriptor() ([]byte, []int)
Deprecated: Use ForgetPasswordRequest.ProtoReflect.Descriptor instead.
func (*ForgetPasswordRequest) GetEmail ¶
func (x *ForgetPasswordRequest) GetEmail() string
func (*ForgetPasswordRequest) ProtoMessage ¶
func (*ForgetPasswordRequest) ProtoMessage()
func (*ForgetPasswordRequest) ProtoReflect ¶
func (x *ForgetPasswordRequest) ProtoReflect() protoreflect.Message
func (*ForgetPasswordRequest) Reset ¶
func (x *ForgetPasswordRequest) Reset()
func (*ForgetPasswordRequest) String ¶
func (x *ForgetPasswordRequest) String() string
type ForgetPasswordResponse ¶
type ForgetPasswordResponse struct {
// contains filtered or unexported fields
}
func (*ForgetPasswordResponse) Descriptor
deprecated
func (*ForgetPasswordResponse) Descriptor() ([]byte, []int)
Deprecated: Use ForgetPasswordResponse.ProtoReflect.Descriptor instead.
func (*ForgetPasswordResponse) ProtoMessage ¶
func (*ForgetPasswordResponse) ProtoMessage()
func (*ForgetPasswordResponse) ProtoReflect ¶
func (x *ForgetPasswordResponse) ProtoReflect() protoreflect.Message
func (*ForgetPasswordResponse) Reset ¶
func (x *ForgetPasswordResponse) Reset()
func (*ForgetPasswordResponse) String ¶
func (x *ForgetPasswordResponse) String() string
type LoginRequest ¶
type LoginRequest struct { UserNameOrEmail string `protobuf:"bytes,1,opt,name=userNameOrEmail,proto3" json:"userNameOrEmail,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*LoginRequest) Descriptor
deprecated
func (*LoginRequest) Descriptor() ([]byte, []int)
Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.
func (*LoginRequest) GetPassword ¶
func (x *LoginRequest) GetPassword() string
func (*LoginRequest) GetUserNameOrEmail ¶
func (x *LoginRequest) GetUserNameOrEmail() string
func (*LoginRequest) ProtoMessage ¶
func (*LoginRequest) ProtoMessage()
func (*LoginRequest) ProtoReflect ¶
func (x *LoginRequest) ProtoReflect() protoreflect.Message
func (*LoginRequest) Reset ¶
func (x *LoginRequest) Reset()
func (*LoginRequest) String ¶
func (x *LoginRequest) String() string
type LoginResponse ¶
type LoginResponse struct { JwtToken string `protobuf:"bytes,1,opt,name=jwtToken,proto3" json:"jwtToken,omitempty"` RefreshToken string `protobuf:"bytes,2,opt,name=refreshToken,proto3" json:"refreshToken,omitempty"` // contains filtered or unexported fields }
func (*LoginResponse) Descriptor
deprecated
func (*LoginResponse) Descriptor() ([]byte, []int)
Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.
func (*LoginResponse) GetJwtToken ¶
func (x *LoginResponse) GetJwtToken() string
func (*LoginResponse) GetRefreshToken ¶
func (x *LoginResponse) GetRefreshToken() string
func (*LoginResponse) ProtoMessage ¶
func (*LoginResponse) ProtoMessage()
func (*LoginResponse) ProtoReflect ¶
func (x *LoginResponse) ProtoReflect() protoreflect.Message
func (*LoginResponse) Reset ¶
func (x *LoginResponse) Reset()
func (*LoginResponse) String ¶
func (x *LoginResponse) String() string
type SignUpRequest ¶
type SignUpRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*SignUpRequest) Descriptor
deprecated
func (*SignUpRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignUpRequest.ProtoReflect.Descriptor instead.
func (*SignUpRequest) GetEmail ¶
func (x *SignUpRequest) GetEmail() string
func (*SignUpRequest) GetPassword ¶
func (x *SignUpRequest) GetPassword() string
func (*SignUpRequest) GetUsername ¶
func (x *SignUpRequest) GetUsername() string
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 {
// contains filtered or unexported fields
}
func (*SignUpResponse) Descriptor
deprecated
func (*SignUpResponse) Descriptor() ([]byte, []int)
Deprecated: Use SignUpResponse.ProtoReflect.Descriptor instead.
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 UnimplementedAuthServer ¶
type UnimplementedAuthServer struct{}
UnimplementedAuthServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedAuthServer) CodeVerification ¶
func (UnimplementedAuthServer) CodeVerification(context.Context, *CodeVerificationRequest) (*CodeVerificationResponse, error)
func (UnimplementedAuthServer) ForgetPassword ¶
func (UnimplementedAuthServer) ForgetPassword(context.Context, *ForgetPasswordRequest) (*ForgetPasswordResponse, error)
func (UnimplementedAuthServer) ForgetPasswordFinalize ¶
func (UnimplementedAuthServer) ForgetPasswordFinalize(context.Context, *ForgetPasswordFinalizeRequest) (*ForgetPasswordFinalizeResponse, error)
func (UnimplementedAuthServer) Login ¶
func (UnimplementedAuthServer) Login(context.Context, *LoginRequest) (*LoginResponse, error)
func (UnimplementedAuthServer) SignUp ¶
func (UnimplementedAuthServer) SignUp(context.Context, *SignUpRequest) (*SignUpResponse, error)
type UnsafeAuthServer ¶
type UnsafeAuthServer interface {
// contains filtered or unexported methods
}
UnsafeAuthServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServer will result in compilation errors.