Documentation
¶
Overview ¶
Package rpc is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterTrueAuthHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterTrueAuthHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TrueAuthClient) error
- func RegisterTrueAuthHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterTrueAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TrueAuthServer) error
- func RegisterTrueAuthServer(s grpc.ServiceRegistrar, srv TrueAuthServer)
- type DeleteRequest
- type DeleteResponse
- type HealthRequest
- type HealthResponse
- func (*HealthResponse) Descriptor() ([]byte, []int)deprecated
- func (x *HealthResponse) GetServer() string
- func (x *HealthResponse) GetService() string
- func (x *HealthResponse) GetStarted() *timestamppb.Timestamp
- func (x *HealthResponse) GetStatus() string
- func (x *HealthResponse) GetTimestamp() *timestamppb.Timestamp
- func (x *HealthResponse) GetUptime() *durationpb.Duration
- func (*HealthResponse) ProtoMessage()
- func (x *HealthResponse) ProtoReflect() protoreflect.Message
- func (x *HealthResponse) Reset()
- func (x *HealthResponse) String() string
- type RefreshRequest
- func (*RefreshRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RefreshRequest) GetCookies() bool
- func (x *RefreshRequest) GetTokens() bool
- func (x *RefreshRequest) GetUser() bool
- func (*RefreshRequest) ProtoMessage()
- func (x *RefreshRequest) ProtoReflect() protoreflect.Message
- func (x *RefreshRequest) Reset()
- func (x *RefreshRequest) String() string
- type RefreshResponse
- func (*RefreshResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RefreshResponse) GetAccessToken() string
- func (x *RefreshResponse) GetAccessTokenExpiresAt() *timestamppb.Timestamp
- func (x *RefreshResponse) GetMessage() string
- func (x *RefreshResponse) GetSessionId() string
- func (x *RefreshResponse) GetUser() *User
- func (*RefreshResponse) ProtoMessage()
- func (x *RefreshResponse) ProtoReflect() protoreflect.Message
- func (x *RefreshResponse) Reset()
- func (x *RefreshResponse) String() string
- type ResetRequest
- func (*ResetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ResetRequest) GetCode() string
- func (x *ResetRequest) GetEmail() string
- func (x *ResetRequest) GetNewPassword() string
- func (x *ResetRequest) GetSignoutAll() bool
- func (*ResetRequest) ProtoMessage()
- func (x *ResetRequest) ProtoReflect() protoreflect.Message
- func (x *ResetRequest) Reset()
- func (x *ResetRequest) String() string
- type ResetResponse
- type SigninRequest
- func (*SigninRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SigninRequest) GetCookies() bool
- func (x *SigninRequest) GetTokens() bool
- func (x *SigninRequest) GetUser() bool
- func (*SigninRequest) ProtoMessage()
- func (x *SigninRequest) ProtoReflect() protoreflect.Message
- func (x *SigninRequest) Reset()
- func (x *SigninRequest) String() string
- type SigninResponse
- func (*SigninResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SigninResponse) GetAccessToken() string
- func (x *SigninResponse) GetAccessTokenExpiresAt() *timestamppb.Timestamp
- func (x *SigninResponse) GetMessage() string
- func (x *SigninResponse) GetRefreshToken() string
- func (x *SigninResponse) GetRefreshTokenExpiresAt() *timestamppb.Timestamp
- func (x *SigninResponse) GetSessionId() string
- func (x *SigninResponse) GetUser() *User
- func (*SigninResponse) ProtoMessage()
- func (x *SigninResponse) ProtoReflect() protoreflect.Message
- func (x *SigninResponse) Reset()
- func (x *SigninResponse) String() string
- type SignoutRequest
- func (*SignoutRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignoutRequest) GetAll() bool
- func (x *SignoutRequest) GetSession() string
- func (*SignoutRequest) ProtoMessage()
- func (x *SignoutRequest) ProtoReflect() protoreflect.Message
- func (x *SignoutRequest) Reset()
- func (x *SignoutRequest) String() string
- type SignoutResponse
- type SignupRequest
- func (*SignupRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SignupRequest) GetEmail() string
- func (x *SignupRequest) GetFirstname() string
- func (x *SignupRequest) GetLastname() 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 TrueAuthClient
- type TrueAuthServer
- type UnimplementedTrueAuthServer
- func (UnimplementedTrueAuthServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
- func (UnimplementedTrueAuthServer) Health(context.Context, *HealthRequest) (*HealthResponse, error)
- func (UnimplementedTrueAuthServer) Refresh(context.Context, *RefreshRequest) (*RefreshResponse, error)
- func (UnimplementedTrueAuthServer) Reset(context.Context, *ResetRequest) (*ResetResponse, error)
- func (UnimplementedTrueAuthServer) Signin(context.Context, *SigninRequest) (*SigninResponse, error)
- func (UnimplementedTrueAuthServer) Signout(context.Context, *SignoutRequest) (*SignoutResponse, error)
- func (UnimplementedTrueAuthServer) Signup(context.Context, *SignupRequest) (*SignupResponse, error)
- func (UnimplementedTrueAuthServer) User(context.Context, *UserRequest) (*UserResponse, error)
- func (UnimplementedTrueAuthServer) Validate(context.Context, *ValidateRequest) (*ValidateResponse, error)
- func (UnimplementedTrueAuthServer) Verify(context.Context, *VerifyRequest) (*VerifyResponse, error)
- func (UnimplementedTrueAuthServer) Welcome(context.Context, *WelcomeRequest) (*WelcomeResponse, error)
- type UnsafeTrueAuthServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetBlocked() bool
- func (x *User) GetCreatedAt() *timestamppb.Timestamp
- func (x *User) GetEmail() string
- func (x *User) GetFirstname() string
- func (x *User) GetId() []byte
- func (x *User) GetLastname() string
- func (x *User) GetUpdatedAt() *timestamppb.Timestamp
- func (x *User) GetUsername() string
- func (x *User) GetVerified() bool
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserRequest
- type UserResponse
- type ValidateRequest
- func (*ValidateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ValidateRequest) GetToken() string
- func (x *ValidateRequest) GetUser() bool
- func (*ValidateRequest) ProtoMessage()
- func (x *ValidateRequest) ProtoReflect() protoreflect.Message
- func (x *ValidateRequest) Reset()
- func (x *ValidateRequest) String() string
- type ValidateResponse
- func (*ValidateResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ValidateResponse) GetMessage() string
- func (x *ValidateResponse) GetUser() *User
- func (*ValidateResponse) ProtoMessage()
- func (x *ValidateResponse) ProtoReflect() protoreflect.Message
- func (x *ValidateResponse) Reset()
- func (x *ValidateResponse) String() string
- type VerifyRequest
- func (*VerifyRequest) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyRequest) GetCode() string
- func (x *VerifyRequest) GetEmail() string
- func (*VerifyRequest) ProtoMessage()
- func (x *VerifyRequest) ProtoReflect() protoreflect.Message
- func (x *VerifyRequest) Reset()
- func (x *VerifyRequest) String() string
- type VerifyResponse
- func (*VerifyResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyResponse) GetMessage() string
- func (x *VerifyResponse) GetUser() *User
- func (*VerifyResponse) ProtoMessage()
- func (x *VerifyResponse) ProtoReflect() protoreflect.Message
- func (x *VerifyResponse) Reset()
- func (x *VerifyResponse) String() string
- type WelcomeRequest
- type WelcomeResponse
- func (*WelcomeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *WelcomeResponse) GetDocs() string
- func (x *WelcomeResponse) GetMessage() string
- func (*WelcomeResponse) ProtoMessage()
- func (x *WelcomeResponse) ProtoReflect() protoreflect.Message
- func (x *WelcomeResponse) Reset()
- func (x *WelcomeResponse) String() string
Constants ¶
const ( TrueAuth_Welcome_FullMethodName = "/trueauth.TrueAuth/Welcome" TrueAuth_Health_FullMethodName = "/trueauth.TrueAuth/Health" TrueAuth_Signup_FullMethodName = "/trueauth.TrueAuth/Signup" TrueAuth_Signin_FullMethodName = "/trueauth.TrueAuth/Signin" TrueAuth_Validate_FullMethodName = "/trueauth.TrueAuth/Validate" TrueAuth_Signout_FullMethodName = "/trueauth.TrueAuth/Signout" TrueAuth_Refresh_FullMethodName = "/trueauth.TrueAuth/Refresh" TrueAuth_Reset_FullMethodName = "/trueauth.TrueAuth/Reset" TrueAuth_Verify_FullMethodName = "/trueauth.TrueAuth/Verify" TrueAuth_Delete_FullMethodName = "/trueauth.TrueAuth/Delete" TrueAuth_User_FullMethodName = "/trueauth.TrueAuth/User" )
Variables ¶
var File_model_user_trueauth_proto protoreflect.FileDescriptor
var File_rpc_delete_trueauth_proto protoreflect.FileDescriptor
var File_rpc_health_trueauth_proto protoreflect.FileDescriptor
var File_rpc_refresh_trueauth_proto protoreflect.FileDescriptor
var File_rpc_reset_trueauth_proto protoreflect.FileDescriptor
var File_rpc_signin_trueauth_proto protoreflect.FileDescriptor
var File_rpc_signout_trueauth_proto protoreflect.FileDescriptor
var File_rpc_signup_trueauth_proto protoreflect.FileDescriptor
var File_rpc_user_trueauth_proto protoreflect.FileDescriptor
var File_rpc_validate_trueauth_proto protoreflect.FileDescriptor
var File_rpc_verify_trueauth_proto protoreflect.FileDescriptor
var File_rpc_welcome_trueauth_proto protoreflect.FileDescriptor
var File_service_trueauth_proto protoreflect.FileDescriptor
var TrueAuth_ServiceDesc = grpc.ServiceDesc{ ServiceName: "trueauth.TrueAuth", HandlerType: (*TrueAuthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Welcome", Handler: _TrueAuth_Welcome_Handler, }, { MethodName: "Health", Handler: _TrueAuth_Health_Handler, }, { MethodName: "Signup", Handler: _TrueAuth_Signup_Handler, }, { MethodName: "Signin", Handler: _TrueAuth_Signin_Handler, }, { MethodName: "Validate", Handler: _TrueAuth_Validate_Handler, }, { MethodName: "Signout", Handler: _TrueAuth_Signout_Handler, }, { MethodName: "Refresh", Handler: _TrueAuth_Refresh_Handler, }, { MethodName: "Reset", Handler: _TrueAuth_Reset_Handler, }, { MethodName: "Verify", Handler: _TrueAuth_Verify_Handler, }, { MethodName: "Delete", Handler: _TrueAuth_Delete_Handler, }, { MethodName: "User", Handler: _TrueAuth_User_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "service.trueauth.proto", }
TrueAuth_ServiceDesc is the grpc.ServiceDesc for TrueAuth service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTrueAuthHandler ¶
func RegisterTrueAuthHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterTrueAuthHandler registers the http handlers for service TrueAuth to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterTrueAuthHandlerClient ¶
func RegisterTrueAuthHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TrueAuthClient) error
RegisterTrueAuthHandlerClient registers the http handlers for service TrueAuth to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TrueAuthClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TrueAuthClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "TrueAuthClient" to call the correct interceptors.
func RegisterTrueAuthHandlerFromEndpoint ¶
func RegisterTrueAuthHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterTrueAuthHandlerFromEndpoint is same as RegisterTrueAuthHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterTrueAuthHandlerServer ¶
func RegisterTrueAuthHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TrueAuthServer) error
RegisterTrueAuthHandlerServer registers the http handlers for service TrueAuth to "mux". UnaryRPC :call TrueAuthServer 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 RegisterTrueAuthHandlerFromEndpoint instead.
func RegisterTrueAuthServer ¶
func RegisterTrueAuthServer(s grpc.ServiceRegistrar, srv TrueAuthServer)
Types ¶
type DeleteRequest ¶
type DeleteRequest struct { Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetCode ¶
func (x *DeleteRequest) GetCode() string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type DeleteResponse ¶
type DeleteResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*DeleteResponse) Descriptor
deprecated
func (*DeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) GetMessage ¶
func (x *DeleteResponse) GetMessage() string
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) ProtoReflect ¶
func (x *DeleteResponse) ProtoReflect() protoreflect.Message
func (*DeleteResponse) Reset ¶
func (x *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (x *DeleteResponse) String() string
type HealthRequest ¶
type HealthRequest struct {
// contains filtered or unexported fields
}
func (*HealthRequest) Descriptor
deprecated
func (*HealthRequest) Descriptor() ([]byte, []int)
Deprecated: Use HealthRequest.ProtoReflect.Descriptor instead.
func (*HealthRequest) ProtoMessage ¶
func (*HealthRequest) ProtoMessage()
func (*HealthRequest) ProtoReflect ¶
func (x *HealthRequest) ProtoReflect() protoreflect.Message
func (*HealthRequest) Reset ¶
func (x *HealthRequest) Reset()
func (*HealthRequest) String ¶
func (x *HealthRequest) String() string
type HealthResponse ¶
type HealthResponse struct { // Status represents the current status of the service Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` // service is the name of the service. Service string `protobuf:"bytes,2,opt,name=service,proto3" json:"service,omitempty"` // server is the name of the current server. Server string `protobuf:"bytes,3,opt,name=server,proto3" json:"server,omitempty"` // Uptime represents the duration since the API was started. Uptime *durationpb.Duration `protobuf:"bytes,4,opt,name=uptime,proto3" json:"uptime,omitempty"` // Started represents the timestamp when the API was started. Started *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=started,proto3" json:"started,omitempty"` // Timestamp represents the current timestamp. Timestamp *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*HealthResponse) Descriptor
deprecated
func (*HealthResponse) Descriptor() ([]byte, []int)
Deprecated: Use HealthResponse.ProtoReflect.Descriptor instead.
func (*HealthResponse) GetServer ¶ added in v0.4.2
func (x *HealthResponse) GetServer() string
func (*HealthResponse) GetService ¶ added in v0.4.2
func (x *HealthResponse) GetService() string
func (*HealthResponse) GetStarted ¶
func (x *HealthResponse) GetStarted() *timestamppb.Timestamp
func (*HealthResponse) GetStatus ¶
func (x *HealthResponse) GetStatus() string
func (*HealthResponse) GetTimestamp ¶
func (x *HealthResponse) GetTimestamp() *timestamppb.Timestamp
func (*HealthResponse) GetUptime ¶
func (x *HealthResponse) GetUptime() *durationpb.Duration
func (*HealthResponse) ProtoMessage ¶
func (*HealthResponse) ProtoMessage()
func (*HealthResponse) ProtoReflect ¶
func (x *HealthResponse) ProtoReflect() protoreflect.Message
func (*HealthResponse) Reset ¶
func (x *HealthResponse) Reset()
func (*HealthResponse) String ¶
func (x *HealthResponse) String() string
type RefreshRequest ¶
type RefreshRequest struct { User bool `protobuf:"varint,1,opt,name=user,proto3" json:"user,omitempty"` Tokens bool `protobuf:"varint,2,opt,name=tokens,proto3" json:"tokens,omitempty"` Cookies bool `protobuf:"varint,3,opt,name=cookies,proto3" json:"cookies,omitempty"` // contains filtered or unexported fields }
func (*RefreshRequest) Descriptor
deprecated
func (*RefreshRequest) Descriptor() ([]byte, []int)
Deprecated: Use RefreshRequest.ProtoReflect.Descriptor instead.
func (*RefreshRequest) GetCookies ¶
func (x *RefreshRequest) GetCookies() bool
func (*RefreshRequest) GetTokens ¶
func (x *RefreshRequest) GetTokens() bool
func (*RefreshRequest) GetUser ¶
func (x *RefreshRequest) GetUser() bool
func (*RefreshRequest) ProtoMessage ¶
func (*RefreshRequest) ProtoMessage()
func (*RefreshRequest) ProtoReflect ¶
func (x *RefreshRequest) ProtoReflect() protoreflect.Message
func (*RefreshRequest) Reset ¶
func (x *RefreshRequest) Reset()
func (*RefreshRequest) String ¶
func (x *RefreshRequest) String() string
type RefreshResponse ¶
type RefreshResponse struct { SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` AccessToken string `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` AccessTokenExpiresAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=access_token_expires_at,json=accessTokenExpiresAt,proto3" json:"access_token_expires_at,omitempty"` User *User `protobuf:"bytes,5,opt,name=user,proto3" json:"user,omitempty"` Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*RefreshResponse) Descriptor
deprecated
func (*RefreshResponse) Descriptor() ([]byte, []int)
Deprecated: Use RefreshResponse.ProtoReflect.Descriptor instead.
func (*RefreshResponse) GetAccessToken ¶
func (x *RefreshResponse) GetAccessToken() string
func (*RefreshResponse) GetAccessTokenExpiresAt ¶
func (x *RefreshResponse) GetAccessTokenExpiresAt() *timestamppb.Timestamp
func (*RefreshResponse) GetMessage ¶
func (x *RefreshResponse) GetMessage() string
func (*RefreshResponse) GetSessionId ¶
func (x *RefreshResponse) GetSessionId() string
func (*RefreshResponse) GetUser ¶
func (x *RefreshResponse) GetUser() *User
func (*RefreshResponse) ProtoMessage ¶
func (*RefreshResponse) ProtoMessage()
func (*RefreshResponse) ProtoReflect ¶
func (x *RefreshResponse) ProtoReflect() protoreflect.Message
func (*RefreshResponse) Reset ¶
func (x *RefreshResponse) Reset()
func (*RefreshResponse) String ¶
func (x *RefreshResponse) String() string
type ResetRequest ¶
type ResetRequest struct { // if already has password reset code Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // required: registered email address to reset Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` // optional: true to signout all sessions SignoutAll bool `protobuf:"varint,3,opt,name=signout_all,json=signoutAll,proto3" json:"signout_all,omitempty"` // send with code to change new password NewPassword string `protobuf:"bytes,4,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"` // contains filtered or unexported fields }
func (*ResetRequest) Descriptor
deprecated
func (*ResetRequest) Descriptor() ([]byte, []int)
Deprecated: Use ResetRequest.ProtoReflect.Descriptor instead.
func (*ResetRequest) GetCode ¶
func (x *ResetRequest) GetCode() string
func (*ResetRequest) GetEmail ¶
func (x *ResetRequest) GetEmail() string
func (*ResetRequest) GetNewPassword ¶
func (x *ResetRequest) GetNewPassword() string
func (*ResetRequest) GetSignoutAll ¶
func (x *ResetRequest) GetSignoutAll() bool
func (*ResetRequest) ProtoMessage ¶
func (*ResetRequest) ProtoMessage()
func (*ResetRequest) ProtoReflect ¶
func (x *ResetRequest) ProtoReflect() protoreflect.Message
func (*ResetRequest) Reset ¶
func (x *ResetRequest) Reset()
func (*ResetRequest) String ¶
func (x *ResetRequest) String() string
type ResetResponse ¶
type ResetResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ResetResponse) Descriptor
deprecated
func (*ResetResponse) Descriptor() ([]byte, []int)
Deprecated: Use ResetResponse.ProtoReflect.Descriptor instead.
func (*ResetResponse) GetMessage ¶
func (x *ResetResponse) GetMessage() string
func (*ResetResponse) ProtoMessage ¶
func (*ResetResponse) ProtoMessage()
func (*ResetResponse) ProtoReflect ¶
func (x *ResetResponse) ProtoReflect() protoreflect.Message
func (*ResetResponse) Reset ¶
func (x *ResetResponse) Reset()
func (*ResetResponse) String ¶
func (x *ResetResponse) String() string
type SigninRequest ¶
type SigninRequest struct { // set to true to return user in response body User bool `protobuf:"varint,1,opt,name=user,proto3" json:"user,omitempty"` // set to true to return tokens in response body Tokens bool `protobuf:"varint,2,opt,name=tokens,proto3" json:"tokens,omitempty"` // set to true to set cookies in response headers Cookies bool `protobuf:"varint,3,opt,name=cookies,proto3" json:"cookies,omitempty"` // contains filtered or unexported fields }
func (*SigninRequest) Descriptor
deprecated
func (*SigninRequest) Descriptor() ([]byte, []int)
Deprecated: Use SigninRequest.ProtoReflect.Descriptor instead.
func (*SigninRequest) GetCookies ¶
func (x *SigninRequest) GetCookies() bool
func (*SigninRequest) GetTokens ¶
func (x *SigninRequest) GetTokens() bool
func (*SigninRequest) GetUser ¶
func (x *SigninRequest) GetUser() bool
func (*SigninRequest) ProtoMessage ¶
func (*SigninRequest) ProtoMessage()
func (*SigninRequest) ProtoReflect ¶
func (x *SigninRequest) ProtoReflect() protoreflect.Message
func (*SigninRequest) Reset ¶
func (x *SigninRequest) Reset()
func (*SigninRequest) String ¶
func (x *SigninRequest) String() string
type SigninResponse ¶
type SigninResponse struct { // if user is set, user is returned in response body User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // if tokens is set, session_id is returned in response body SessionId string `protobuf:"bytes,2,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` // if tokens is set, access_token is returned in response body AccessToken string `protobuf:"bytes,3,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` // if tokens is set, refresh_token is returned in response body RefreshToken string `protobuf:"bytes,4,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` // if tokens is set, access_token_expires_at is returned in response body AccessTokenExpiresAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=access_token_expires_at,json=accessTokenExpiresAt,proto3" json:"access_token_expires_at,omitempty"` // if tokens is set, refresh_token_expires_at is returned in response body RefreshTokenExpiresAt *timestamppb.Timestamp `` /* 128-byte string literal not displayed */ // successfull message Message string `protobuf:"bytes,7,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*SigninResponse) Descriptor
deprecated
func (*SigninResponse) Descriptor() ([]byte, []int)
Deprecated: Use SigninResponse.ProtoReflect.Descriptor instead.
func (*SigninResponse) GetAccessToken ¶
func (x *SigninResponse) GetAccessToken() string
func (*SigninResponse) GetAccessTokenExpiresAt ¶
func (x *SigninResponse) GetAccessTokenExpiresAt() *timestamppb.Timestamp
func (*SigninResponse) GetMessage ¶
func (x *SigninResponse) GetMessage() string
func (*SigninResponse) GetRefreshToken ¶
func (x *SigninResponse) GetRefreshToken() string
func (*SigninResponse) GetRefreshTokenExpiresAt ¶
func (x *SigninResponse) GetRefreshTokenExpiresAt() *timestamppb.Timestamp
func (*SigninResponse) GetSessionId ¶
func (x *SigninResponse) GetSessionId() string
func (*SigninResponse) GetUser ¶
func (x *SigninResponse) GetUser() *User
func (*SigninResponse) ProtoMessage ¶
func (*SigninResponse) ProtoMessage()
func (*SigninResponse) ProtoReflect ¶
func (x *SigninResponse) ProtoReflect() protoreflect.Message
func (*SigninResponse) Reset ¶
func (x *SigninResponse) Reset()
func (*SigninResponse) String ¶
func (x *SigninResponse) String() string
type SignoutRequest ¶
type SignoutRequest struct { // set sessionId to signout specific session Session string `protobuf:"bytes,1,opt,name=session,proto3" json:"session,omitempty"` // set to true to signout all sessions All bool `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"` // contains filtered or unexported fields }
func (*SignoutRequest) Descriptor
deprecated
func (*SignoutRequest) Descriptor() ([]byte, []int)
Deprecated: Use SignoutRequest.ProtoReflect.Descriptor instead.
func (*SignoutRequest) GetAll ¶
func (x *SignoutRequest) GetAll() bool
func (*SignoutRequest) GetSession ¶
func (x *SignoutRequest) GetSession() string
func (*SignoutRequest) ProtoMessage ¶
func (*SignoutRequest) ProtoMessage()
func (*SignoutRequest) ProtoReflect ¶
func (x *SignoutRequest) ProtoReflect() protoreflect.Message
func (*SignoutRequest) Reset ¶
func (x *SignoutRequest) Reset()
func (*SignoutRequest) String ¶
func (x *SignoutRequest) String() string
type SignoutResponse ¶
type SignoutResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*SignoutResponse) Descriptor
deprecated
func (*SignoutResponse) Descriptor() ([]byte, []int)
Deprecated: Use SignoutResponse.ProtoReflect.Descriptor instead.
func (*SignoutResponse) GetMessage ¶
func (x *SignoutResponse) GetMessage() string
func (*SignoutResponse) ProtoMessage ¶
func (*SignoutResponse) ProtoMessage()
func (*SignoutResponse) ProtoReflect ¶
func (x *SignoutResponse) ProtoReflect() protoreflect.Message
func (*SignoutResponse) Reset ¶
func (x *SignoutResponse) Reset()
func (*SignoutResponse) String ¶
func (x *SignoutResponse) 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"` Firstname string `protobuf:"bytes,4,opt,name=firstname,proto3" json:"firstname,omitempty"` Lastname string `protobuf:"bytes,5,opt,name=lastname,proto3" json:"lastname,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) GetFirstname ¶
func (x *SignupRequest) GetFirstname() string
func (*SignupRequest) GetLastname ¶
func (x *SignupRequest) GetLastname() 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 { // if user is set to true, user is returned in response body User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*SignupResponse) Descriptor
deprecated
func (*SignupResponse) Descriptor() ([]byte, []int)
Deprecated: Use SignupResponse.ProtoReflect.Descriptor instead.
func (*SignupResponse) GetUser ¶
func (x *SignupResponse) GetUser() *User
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 TrueAuthClient ¶
type TrueAuthClient interface { // Welcome endpoint returns a welcome message. Welcome(ctx context.Context, in *WelcomeRequest, opts ...grpc.CallOption) (*WelcomeResponse, error) // Health endpoint returns the health status of the API. Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error) Signup(ctx context.Context, in *SignupRequest, opts ...grpc.CallOption) (*SignupResponse, error) Signin(ctx context.Context, in *SigninRequest, opts ...grpc.CallOption) (*SigninResponse, error) Validate(ctx context.Context, in *ValidateRequest, opts ...grpc.CallOption) (*ValidateResponse, error) Signout(ctx context.Context, in *SignoutRequest, opts ...grpc.CallOption) (*SignoutResponse, error) Refresh(ctx context.Context, in *RefreshRequest, opts ...grpc.CallOption) (*RefreshResponse, error) Reset(ctx context.Context, in *ResetRequest, opts ...grpc.CallOption) (*ResetResponse, error) Verify(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) User(ctx context.Context, in *UserRequest, opts ...grpc.CallOption) (*UserResponse, error) }
TrueAuthClient is the client API for TrueAuth 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 NewTrueAuthClient ¶
func NewTrueAuthClient(cc grpc.ClientConnInterface) TrueAuthClient
type TrueAuthServer ¶
type TrueAuthServer interface { // Welcome endpoint returns a welcome message. Welcome(context.Context, *WelcomeRequest) (*WelcomeResponse, error) // Health endpoint returns the health status of the API. Health(context.Context, *HealthRequest) (*HealthResponse, error) Signup(context.Context, *SignupRequest) (*SignupResponse, error) Signin(context.Context, *SigninRequest) (*SigninResponse, error) Validate(context.Context, *ValidateRequest) (*ValidateResponse, error) Signout(context.Context, *SignoutRequest) (*SignoutResponse, error) Refresh(context.Context, *RefreshRequest) (*RefreshResponse, error) Reset(context.Context, *ResetRequest) (*ResetResponse, error) Verify(context.Context, *VerifyRequest) (*VerifyResponse, error) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) User(context.Context, *UserRequest) (*UserResponse, error) // contains filtered or unexported methods }
TrueAuthServer is the server API for TrueAuth service. All implementations must embed UnimplementedTrueAuthServer for forward compatibility
type UnimplementedTrueAuthServer ¶
type UnimplementedTrueAuthServer struct { }
UnimplementedTrueAuthServer must be embedded to have forward compatible implementations.
func (UnimplementedTrueAuthServer) Delete ¶
func (UnimplementedTrueAuthServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
func (UnimplementedTrueAuthServer) Health ¶
func (UnimplementedTrueAuthServer) Health(context.Context, *HealthRequest) (*HealthResponse, error)
func (UnimplementedTrueAuthServer) Refresh ¶
func (UnimplementedTrueAuthServer) Refresh(context.Context, *RefreshRequest) (*RefreshResponse, error)
func (UnimplementedTrueAuthServer) Reset ¶
func (UnimplementedTrueAuthServer) Reset(context.Context, *ResetRequest) (*ResetResponse, error)
func (UnimplementedTrueAuthServer) Signin ¶
func (UnimplementedTrueAuthServer) Signin(context.Context, *SigninRequest) (*SigninResponse, error)
func (UnimplementedTrueAuthServer) Signout ¶
func (UnimplementedTrueAuthServer) Signout(context.Context, *SignoutRequest) (*SignoutResponse, error)
func (UnimplementedTrueAuthServer) Signup ¶
func (UnimplementedTrueAuthServer) Signup(context.Context, *SignupRequest) (*SignupResponse, error)
func (UnimplementedTrueAuthServer) User ¶
func (UnimplementedTrueAuthServer) User(context.Context, *UserRequest) (*UserResponse, error)
func (UnimplementedTrueAuthServer) Validate ¶
func (UnimplementedTrueAuthServer) Validate(context.Context, *ValidateRequest) (*ValidateResponse, error)
func (UnimplementedTrueAuthServer) Verify ¶
func (UnimplementedTrueAuthServer) Verify(context.Context, *VerifyRequest) (*VerifyResponse, error)
func (UnimplementedTrueAuthServer) Welcome ¶
func (UnimplementedTrueAuthServer) Welcome(context.Context, *WelcomeRequest) (*WelcomeResponse, error)
type UnsafeTrueAuthServer ¶
type UnsafeTrueAuthServer interface {
// contains filtered or unexported methods
}
UnsafeTrueAuthServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TrueAuthServer will result in compilation errors.
type User ¶
type User struct { Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"` Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` Firstname string `protobuf:"bytes,4,opt,name=firstname,proto3" json:"firstname,omitempty"` Lastname string `protobuf:"bytes,5,opt,name=lastname,proto3" json:"lastname,omitempty"` Verified bool `protobuf:"varint,6,opt,name=verified,proto3" json:"verified,omitempty"` Blocked bool `protobuf:"varint,7,opt,name=blocked,proto3" json:"blocked,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetBlocked ¶
func (*User) GetCreatedAt ¶
func (x *User) GetCreatedAt() *timestamppb.Timestamp
func (*User) GetFirstname ¶
func (*User) GetLastname ¶
func (*User) GetUpdatedAt ¶
func (x *User) GetUpdatedAt() *timestamppb.Timestamp
func (*User) GetUsername ¶
func (*User) GetVerified ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserRequest ¶
type UserRequest struct {
// contains filtered or unexported fields
}
func (*UserRequest) Descriptor
deprecated
func (*UserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserRequest.ProtoReflect.Descriptor instead.
func (*UserRequest) ProtoMessage ¶
func (*UserRequest) ProtoMessage()
func (*UserRequest) ProtoReflect ¶
func (x *UserRequest) ProtoReflect() protoreflect.Message
func (*UserRequest) Reset ¶
func (x *UserRequest) Reset()
func (*UserRequest) String ¶
func (x *UserRequest) String() string
type UserResponse ¶
type UserResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*UserResponse) Descriptor
deprecated
func (*UserResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserResponse.ProtoReflect.Descriptor instead.
func (*UserResponse) GetUser ¶
func (x *UserResponse) GetUser() *User
func (*UserResponse) ProtoMessage ¶
func (*UserResponse) ProtoMessage()
func (*UserResponse) ProtoReflect ¶
func (x *UserResponse) ProtoReflect() protoreflect.Message
func (*UserResponse) Reset ¶
func (x *UserResponse) Reset()
func (*UserResponse) String ¶
func (x *UserResponse) String() string
type ValidateRequest ¶
type ValidateRequest struct { // token to validate Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // set to true to return user in response body User bool `protobuf:"varint,2,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*ValidateRequest) Descriptor
deprecated
func (*ValidateRequest) Descriptor() ([]byte, []int)
Deprecated: Use ValidateRequest.ProtoReflect.Descriptor instead.
func (*ValidateRequest) GetToken ¶
func (x *ValidateRequest) GetToken() string
func (*ValidateRequest) GetUser ¶
func (x *ValidateRequest) GetUser() bool
func (*ValidateRequest) ProtoMessage ¶
func (*ValidateRequest) ProtoMessage()
func (*ValidateRequest) ProtoReflect ¶
func (x *ValidateRequest) ProtoReflect() protoreflect.Message
func (*ValidateRequest) Reset ¶
func (x *ValidateRequest) Reset()
func (*ValidateRequest) String ¶
func (x *ValidateRequest) String() string
type ValidateResponse ¶
type ValidateResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*ValidateResponse) Descriptor
deprecated
func (*ValidateResponse) Descriptor() ([]byte, []int)
Deprecated: Use ValidateResponse.ProtoReflect.Descriptor instead.
func (*ValidateResponse) GetMessage ¶
func (x *ValidateResponse) GetMessage() string
func (*ValidateResponse) GetUser ¶
func (x *ValidateResponse) GetUser() *User
func (*ValidateResponse) ProtoMessage ¶
func (*ValidateResponse) ProtoMessage()
func (*ValidateResponse) ProtoReflect ¶
func (x *ValidateResponse) ProtoReflect() protoreflect.Message
func (*ValidateResponse) Reset ¶
func (x *ValidateResponse) Reset()
func (*ValidateResponse) String ¶
func (x *ValidateResponse) String() string
type VerifyRequest ¶
type VerifyRequest struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*VerifyRequest) Descriptor
deprecated
func (*VerifyRequest) Descriptor() ([]byte, []int)
Deprecated: Use VerifyRequest.ProtoReflect.Descriptor instead.
func (*VerifyRequest) GetCode ¶
func (x *VerifyRequest) GetCode() string
func (*VerifyRequest) GetEmail ¶
func (x *VerifyRequest) GetEmail() string
func (*VerifyRequest) ProtoMessage ¶
func (*VerifyRequest) ProtoMessage()
func (*VerifyRequest) ProtoReflect ¶
func (x *VerifyRequest) ProtoReflect() protoreflect.Message
func (*VerifyRequest) Reset ¶
func (x *VerifyRequest) Reset()
func (*VerifyRequest) String ¶
func (x *VerifyRequest) String() string
type VerifyResponse ¶
type VerifyResponse struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*VerifyResponse) Descriptor
deprecated
func (*VerifyResponse) Descriptor() ([]byte, []int)
Deprecated: Use VerifyResponse.ProtoReflect.Descriptor instead.
func (*VerifyResponse) GetMessage ¶
func (x *VerifyResponse) GetMessage() string
func (*VerifyResponse) GetUser ¶
func (x *VerifyResponse) GetUser() *User
func (*VerifyResponse) ProtoMessage ¶
func (*VerifyResponse) ProtoMessage()
func (*VerifyResponse) ProtoReflect ¶
func (x *VerifyResponse) ProtoReflect() protoreflect.Message
func (*VerifyResponse) Reset ¶
func (x *VerifyResponse) Reset()
func (*VerifyResponse) String ¶
func (x *VerifyResponse) String() string
type WelcomeRequest ¶
type WelcomeRequest struct {
// contains filtered or unexported fields
}
func (*WelcomeRequest) Descriptor
deprecated
func (*WelcomeRequest) Descriptor() ([]byte, []int)
Deprecated: Use WelcomeRequest.ProtoReflect.Descriptor instead.
func (*WelcomeRequest) ProtoMessage ¶
func (*WelcomeRequest) ProtoMessage()
func (*WelcomeRequest) ProtoReflect ¶
func (x *WelcomeRequest) ProtoReflect() protoreflect.Message
func (*WelcomeRequest) Reset ¶
func (x *WelcomeRequest) Reset()
func (*WelcomeRequest) String ¶
func (x *WelcomeRequest) String() string
type WelcomeResponse ¶
type WelcomeResponse struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` Docs string `protobuf:"bytes,2,opt,name=docs,proto3" json:"docs,omitempty"` // contains filtered or unexported fields }
func (*WelcomeResponse) Descriptor
deprecated
func (*WelcomeResponse) Descriptor() ([]byte, []int)
Deprecated: Use WelcomeResponse.ProtoReflect.Descriptor instead.
func (*WelcomeResponse) GetDocs ¶
func (x *WelcomeResponse) GetDocs() string
func (*WelcomeResponse) GetMessage ¶
func (x *WelcomeResponse) GetMessage() string
func (*WelcomeResponse) ProtoMessage ¶
func (*WelcomeResponse) ProtoMessage()
func (*WelcomeResponse) ProtoReflect ¶
func (x *WelcomeResponse) ProtoReflect() protoreflect.Message
func (*WelcomeResponse) Reset ¶
func (x *WelcomeResponse) Reset()
func (*WelcomeResponse) String ¶
func (x *WelcomeResponse) String() string
Source Files
¶
- model_user.trueauth.pb.go
- rpc_delete.trueauth.pb.go
- rpc_health.trueauth.pb.go
- rpc_refresh.trueauth.pb.go
- rpc_reset.trueauth.pb.go
- rpc_signin.trueauth.pb.go
- rpc_signout.trueauth.pb.go
- rpc_signup.trueauth.pb.go
- rpc_user.trueauth.pb.go
- rpc_validate.trueauth.pb.go
- rpc_verify.trueauth.pb.go
- rpc_welcome.trueauth.pb.go
- service.trueauth.pb.go
- service.trueauth.pb.gw.go
- service.trueauth_grpc.pb.go