Documentation ¶
Index ¶
- Variables
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type AuthMethod
- func (*AuthMethod) Descriptor() ([]byte, []int)deprecated
- func (x *AuthMethod) GetLoginType() model.LoginType
- func (m *AuthMethod) GetMethod() isAuthMethod_Method
- func (*AuthMethod) ProtoMessage()
- func (x *AuthMethod) ProtoReflect() protoreflect.Message
- func (x *AuthMethod) Reset()
- func (x *AuthMethod) String() string
- type AuthMethod_LoginType
- type CreateRequest
- func (*CreateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateRequest) GetInitialGroupId() string
- func (x *CreateRequest) GetInitializers() []*Update
- func (*CreateRequest) ProtoMessage()
- func (x *CreateRequest) ProtoReflect() protoreflect.Message
- func (x *CreateRequest) Reset()
- func (x *CreateRequest) String() string
- type CreateResponse
- type DeleteRequest
- type DeleteResponse
- type GetByIdentifierRequest
- func (*GetByIdentifierRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetByIdentifierRequest) GetIdentifier() *model.UserIdentifier
- func (*GetByIdentifierRequest) ProtoMessage()
- func (x *GetByIdentifierRequest) ProtoReflect() protoreflect.Message
- func (x *GetByIdentifierRequest) Reset()
- func (x *GetByIdentifierRequest) String() string
- type GetByIdentifierResponse
- func (*GetByIdentifierResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetByIdentifierResponse) GetUser() *User
- func (*GetByIdentifierResponse) ProtoMessage()
- func (x *GetByIdentifierResponse) ProtoReflect() protoreflect.Message
- func (x *GetByIdentifierResponse) Reset()
- func (x *GetByIdentifierResponse) String() string
- type GetRequest
- type GetResponse
- type ListRequest
- func (*ListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRequest) GetPagination() *model.Pagination
- func (x *ListRequest) GetSearch() string
- func (*ListRequest) ProtoMessage()
- func (x *ListRequest) ProtoReflect() protoreflect.Message
- func (x *ListRequest) Reset()
- func (x *ListRequest) String() string
- type ListResponse
- func (*ListResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListResponse) GetTotal() uint64
- func (x *ListResponse) GetUsers() []*model.UserEntry
- func (*ListResponse) ProtoMessage()
- func (x *ListResponse) ProtoReflect() protoreflect.Message
- func (x *ListResponse) Reset()
- func (x *ListResponse) String() string
- type ListSessionsRequest
- func (*ListSessionsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListSessionsRequest) GetPagination() *model.Pagination
- func (x *ListSessionsRequest) GetUserId() string
- func (*ListSessionsRequest) ProtoMessage()
- func (x *ListSessionsRequest) ProtoReflect() protoreflect.Message
- func (x *ListSessionsRequest) Reset()
- func (x *ListSessionsRequest) String() string
- type ListSessionsResponse
- func (*ListSessionsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListSessionsResponse) GetSessions() []*SessionEntry
- func (x *ListSessionsResponse) GetTotal() uint64
- func (*ListSessionsResponse) ProtoMessage()
- func (x *ListSessionsResponse) ProtoReflect() protoreflect.Message
- func (x *ListSessionsResponse) Reset()
- func (x *ListSessionsResponse) String() string
- type Profile
- type ServiceClient
- type ServiceServer
- type Session
- func (*Session) Descriptor() ([]byte, []int)deprecated
- func (x *Session) GetAuthMethod() *AuthMethod
- func (x *Session) GetCountry() string
- func (x *Session) GetCreatedAt() *timestamppb.Timestamp
- func (x *Session) GetExpiresAt() *timestamppb.Timestamp
- func (x *Session) GetInvalidatedAt() *timestamppb.Timestamp
- func (x *Session) GetIsInvalidated() bool
- func (x *Session) GetPostalCode() int32
- func (x *Session) GetRenewedAt() *timestamppb.Timestamp
- func (*Session) ProtoMessage()
- func (x *Session) ProtoReflect() protoreflect.Message
- func (x *Session) Reset()
- func (x *Session) String() string
- type SessionEntry
- func (*SessionEntry) Descriptor() ([]byte, []int)deprecated
- func (x *SessionEntry) GetSession() *Session
- func (x *SessionEntry) GetSessionId() string
- func (*SessionEntry) ProtoMessage()
- func (x *SessionEntry) ProtoReflect() protoreflect.Message
- func (x *SessionEntry) Reset()
- func (x *SessionEntry) String() string
- type UnimplementedServiceServer
- func (UnimplementedServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
- func (UnimplementedServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
- func (UnimplementedServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
- func (UnimplementedServiceServer) GetByIdentifier(context.Context, *GetByIdentifierRequest) (*GetByIdentifierResponse, error)
- func (UnimplementedServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
- func (UnimplementedServiceServer) ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error)
- func (UnimplementedServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
- type UnsafeServiceServer
- type Update
- func (*Update) Descriptor() ([]byte, []int)deprecated
- func (x *Update) GetDeleteMetadataKey() string
- func (x *Update) GetEmail() string
- func (m *Update) GetField() isUpdate_Field
- func (x *Update) GetHashedPassword() *model.HashingInstance
- func (x *Update) GetIsEmailVerified() bool
- func (x *Update) GetIsPhoneVerified() bool
- func (x *Update) GetPassword() string
- func (x *Update) GetPhoneNumber() string
- func (x *Update) GetProfile() *Profile
- func (x *Update) GetResetSessions() *Update_ResetSessions
- func (x *Update) GetSetMetadata() *model.Metadata
- func (x *Update) GetUsername() string
- func (*Update) ProtoMessage()
- func (x *Update) ProtoReflect() protoreflect.Message
- func (x *Update) Reset()
- func (x *Update) String() string
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetUpdates() []*Update
- func (x *UpdateRequest) GetUserId() string
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
- type UpdateResponse
- type Update_DeleteMetadataKey
- type Update_Email
- type Update_HashedPassword
- type Update_IsEmailVerified
- type Update_IsPhoneVerified
- type Update_Password
- type Update_PhoneNumber
- type Update_Profile
- type Update_ResetSessions
- type Update_ResetSessions_
- type Update_SetMetadata
- type Update_Username
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetIsEmailVerified() bool
- func (x *User) GetIsPhoneVerified() bool
- func (x *User) GetMetadata() map[string][]byte
- func (x *User) GetNewSessionsSince() *timestamppb.Timestamp
- func (x *User) GetProfile() *Profile
- func (x *User) GetRegisterInfo() *model.RegisterInfo
- func (x *User) GetUpdatedAt() *timestamppb.Timestamp
- func (x *User) GetUserId() string
- func (x *User) GetUserInfo() *model.UserInfo
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type VerificationCode
- func (*VerificationCode) Descriptor() ([]byte, []int)deprecated
- func (x *VerificationCode) GetAttempts() int32
- func (x *VerificationCode) GetCode() *model.HashingInstance
- func (x *VerificationCode) GetExpiresAt() *timestamppb.Timestamp
- func (x *VerificationCode) GetLastAttempt() *timestamppb.Timestamp
- func (x *VerificationCode) GetSentAt() *timestamppb.Timestamp
- func (x *VerificationCode) GetType() VerificationType
- func (x *VerificationCode) GetUserId() string
- func (*VerificationCode) ProtoMessage()
- func (x *VerificationCode) ProtoReflect() protoreflect.Message
- func (x *VerificationCode) Reset()
- func (x *VerificationCode) String() string
- type VerificationType
- func (VerificationType) Descriptor() protoreflect.EnumDescriptor
- func (x VerificationType) Enum() *VerificationType
- func (VerificationType) EnumDescriptor() ([]byte, []int)deprecated
- func (x VerificationType) Number() protoreflect.EnumNumber
- func (x VerificationType) String() string
- func (VerificationType) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( VerificationType_name = map[int32]string{ 0: "VERIFICATION_TYPE_UNSPECIFIED", 1: "VERIFICATION_TYPE_EMAIL", 2: "VERIFICATION_TYPE_TEXT", 3: "VERIFICATION_TYPE_RESET_PASSWORD", } VerificationType_value = map[string]int32{ "VERIFICATION_TYPE_UNSPECIFIED": 0, "VERIFICATION_TYPE_EMAIL": 1, "VERIFICATION_TYPE_TEXT": 2, "VERIFICATION_TYPE_RESET_PASSWORD": 3, } )
Enum value maps for VerificationType.
var File_api_v1_user_service_proto protoreflect.FileDescriptor
var File_api_v1_user_user_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.v1.user.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _Service_Create_Handler, }, { MethodName: "Update", Handler: _Service_Update_Handler, }, { MethodName: "ListSessions", Handler: _Service_ListSessions_Handler, }, { MethodName: "Get", Handler: _Service_Get_Handler, }, { MethodName: "GetByIdentifier", Handler: _Service_GetByIdentifier_Handler, }, { MethodName: "List", Handler: _Service_List_Handler, }, { MethodName: "Delete", Handler: _Service_Delete_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/user/service.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type AuthMethod ¶
type AuthMethod struct { // Types that are assignable to Method: // // *AuthMethod_LoginType Method isAuthMethod_Method `protobuf_oneof:"method"` // contains filtered or unexported fields }
how a user is authenticated.
func (*AuthMethod) Descriptor
deprecated
func (*AuthMethod) Descriptor() ([]byte, []int)
Deprecated: Use AuthMethod.ProtoReflect.Descriptor instead.
func (*AuthMethod) GetLoginType ¶
func (x *AuthMethod) GetLoginType() model.LoginType
func (*AuthMethod) GetMethod ¶
func (m *AuthMethod) GetMethod() isAuthMethod_Method
func (*AuthMethod) ProtoMessage ¶
func (*AuthMethod) ProtoMessage()
func (*AuthMethod) ProtoReflect ¶
func (x *AuthMethod) ProtoReflect() protoreflect.Message
func (*AuthMethod) Reset ¶
func (x *AuthMethod) Reset()
func (*AuthMethod) String ¶
func (x *AuthMethod) String() string
type AuthMethod_LoginType ¶
type CreateRequest ¶
type CreateRequest struct { // Initial fields to set. Initializers []*Update `protobuf:"bytes,1,rep,name=initializers,proto3" json:"initializers,omitempty"` // If set, the user will be added to this group upon creation. InitialGroupId string `protobuf:"bytes,2,opt,name=initial_group_id,json=initialGroupId,proto3" json:"initial_group_id,omitempty"` // contains filtered or unexported fields }
The request to create a user.
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetInitialGroupId ¶
func (x *CreateRequest) GetInitialGroupId() string
func (*CreateRequest) GetInitializers ¶
func (x *CreateRequest) GetInitializers() []*Update
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type CreateResponse ¶
type CreateResponse struct { // The created user. User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
The response of creating a user.
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetUser ¶
func (x *CreateResponse) GetUser() *User
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
type DeleteRequest ¶
type DeleteRequest struct { // The user identifier to fetch the user. UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
Request for deleting a user.
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetUserId ¶
func (x *DeleteRequest) GetUserId() 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 {
// contains filtered or unexported fields
}
Empty response for deleting a user.
func (*DeleteResponse) Descriptor
deprecated
func (*DeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
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 GetByIdentifierRequest ¶
type GetByIdentifierRequest struct { // The identifier to lookup. Identifier *model.UserIdentifier `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"` // contains filtered or unexported fields }
Request to get a user by an identifier.
func (*GetByIdentifierRequest) Descriptor
deprecated
func (*GetByIdentifierRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetByIdentifierRequest.ProtoReflect.Descriptor instead.
func (*GetByIdentifierRequest) GetIdentifier ¶
func (x *GetByIdentifierRequest) GetIdentifier() *model.UserIdentifier
func (*GetByIdentifierRequest) ProtoMessage ¶
func (*GetByIdentifierRequest) ProtoMessage()
func (*GetByIdentifierRequest) ProtoReflect ¶
func (x *GetByIdentifierRequest) ProtoReflect() protoreflect.Message
func (*GetByIdentifierRequest) Reset ¶
func (x *GetByIdentifierRequest) Reset()
func (*GetByIdentifierRequest) String ¶
func (x *GetByIdentifierRequest) String() string
type GetByIdentifierResponse ¶
type GetByIdentifierResponse struct { // The user. User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
Response to get a user by an identifier.
func (*GetByIdentifierResponse) Descriptor
deprecated
func (*GetByIdentifierResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetByIdentifierResponse.ProtoReflect.Descriptor instead.
func (*GetByIdentifierResponse) GetUser ¶
func (x *GetByIdentifierResponse) GetUser() *User
func (*GetByIdentifierResponse) ProtoMessage ¶
func (*GetByIdentifierResponse) ProtoMessage()
func (*GetByIdentifierResponse) ProtoReflect ¶
func (x *GetByIdentifierResponse) ProtoReflect() protoreflect.Message
func (*GetByIdentifierResponse) Reset ¶
func (x *GetByIdentifierResponse) Reset()
func (*GetByIdentifierResponse) String ¶
func (x *GetByIdentifierResponse) String() string
type GetRequest ¶
type GetRequest struct { // The user identifier to fetch the user. UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
Get request for retrieving a user.
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetUserId ¶
func (x *GetRequest) GetUserId() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type GetResponse ¶
type GetResponse struct { // The retrieved user. User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
The response of getting a user.
func (*GetResponse) Descriptor
deprecated
func (*GetResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.
func (*GetResponse) GetUser ¶
func (x *GetResponse) GetUser() *User
func (*GetResponse) ProtoMessage ¶
func (*GetResponse) ProtoMessage()
func (*GetResponse) ProtoReflect ¶
func (x *GetResponse) ProtoReflect() protoreflect.Message
func (*GetResponse) Reset ¶
func (x *GetResponse) Reset()
func (*GetResponse) String ¶
func (x *GetResponse) String() string
type ListRequest ¶
type ListRequest struct { // Pagination options. Pagination *model.Pagination `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` // Search string. Search string `protobuf:"bytes,2,opt,name=search,proto3" json:"search,omitempty"` // contains filtered or unexported fields }
Request for listing users.
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetPagination ¶
func (x *ListRequest) GetPagination() *model.Pagination
func (*ListRequest) GetSearch ¶
func (x *ListRequest) GetSearch() string
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
type ListResponse ¶
type ListResponse struct { // The users returned. Users []*model.UserEntry `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` // total number of users. Total uint64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
Response for listing users.
func (*ListResponse) Descriptor
deprecated
func (*ListResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.
func (*ListResponse) GetTotal ¶
func (x *ListResponse) GetTotal() uint64
func (*ListResponse) GetUsers ¶
func (x *ListResponse) GetUsers() []*model.UserEntry
func (*ListResponse) ProtoMessage ¶
func (*ListResponse) ProtoMessage()
func (*ListResponse) ProtoReflect ¶
func (x *ListResponse) ProtoReflect() protoreflect.Message
func (*ListResponse) Reset ¶
func (x *ListResponse) Reset()
func (*ListResponse) String ¶
func (x *ListResponse) String() string
type ListSessionsRequest ¶
type ListSessionsRequest struct { // The user to retrieve sessions for. UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // Pagination options. Pagination *model.Pagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` // contains filtered or unexported fields }
Request to list a users login sessions.
func (*ListSessionsRequest) Descriptor
deprecated
func (*ListSessionsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListSessionsRequest.ProtoReflect.Descriptor instead.
func (*ListSessionsRequest) GetPagination ¶
func (x *ListSessionsRequest) GetPagination() *model.Pagination
func (*ListSessionsRequest) GetUserId ¶
func (x *ListSessionsRequest) GetUserId() string
func (*ListSessionsRequest) ProtoMessage ¶
func (*ListSessionsRequest) ProtoMessage()
func (*ListSessionsRequest) ProtoReflect ¶
func (x *ListSessionsRequest) ProtoReflect() protoreflect.Message
func (*ListSessionsRequest) Reset ¶
func (x *ListSessionsRequest) Reset()
func (*ListSessionsRequest) String ¶
func (x *ListSessionsRequest) String() string
type ListSessionsResponse ¶
type ListSessionsResponse struct { // The retrieved sessions. Sessions []*SessionEntry `protobuf:"bytes,1,rep,name=sessions,proto3" json:"sessions,omitempty"` // The total number of sessions. Total uint64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
The response of listing a users login sessions.
func (*ListSessionsResponse) Descriptor
deprecated
func (*ListSessionsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListSessionsResponse.ProtoReflect.Descriptor instead.
func (*ListSessionsResponse) GetSessions ¶
func (x *ListSessionsResponse) GetSessions() []*SessionEntry
func (*ListSessionsResponse) GetTotal ¶
func (x *ListSessionsResponse) GetTotal() uint64
func (*ListSessionsResponse) ProtoMessage ¶
func (*ListSessionsResponse) ProtoMessage()
func (*ListSessionsResponse) ProtoReflect ¶
func (x *ListSessionsResponse) ProtoReflect() protoreflect.Message
func (*ListSessionsResponse) Reset ¶
func (x *ListSessionsResponse) Reset()
func (*ListSessionsResponse) String ¶
func (x *ListSessionsResponse) String() string
type Profile ¶
type Profile struct { // First name of the user. FirstName string `protobuf:"bytes,1,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"` // Last name of the user. LastName string `protobuf:"bytes,2,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"` // contains filtered or unexported fields }
User profile
func (*Profile) Descriptor
deprecated
func (*Profile) GetFirstName ¶
func (*Profile) GetLastName ¶
func (*Profile) ProtoMessage ¶
func (*Profile) ProtoMessage()
func (*Profile) ProtoReflect ¶
func (x *Profile) ProtoReflect() protoreflect.Message
type ServiceClient ¶
type ServiceClient interface { // Create a new user. Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error) // Update a users profile and info. Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, error) // Get the list of active sessions for the given user. ListSessions(ctx context.Context, in *ListSessionsRequest, opts ...grpc.CallOption) (*ListSessionsResponse, error) // Get a user by user-id. Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error) // Lookup a user by a unique identifier - email, username, phone number etc. GetByIdentifier(ctx context.Context, in *GetByIdentifierRequest, opts ...grpc.CallOption) (*GetByIdentifierResponse, error) // List users. List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) // Delete a specific user. Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) }
ServiceClient is the client API for Service 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 NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { // Create a new user. Create(context.Context, *CreateRequest) (*CreateResponse, error) // Update a users profile and info. Update(context.Context, *UpdateRequest) (*UpdateResponse, error) // Get the list of active sessions for the given user. ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error) // Get a user by user-id. Get(context.Context, *GetRequest) (*GetResponse, error) // Lookup a user by a unique identifier - email, username, phone number etc. GetByIdentifier(context.Context, *GetByIdentifierRequest) (*GetByIdentifierResponse, error) // List users. List(context.Context, *ListRequest) (*ListResponse, error) // Delete a specific user. Delete(context.Context, *DeleteRequest) (*DeleteResponse, error) // contains filtered or unexported methods }
ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility
type Session ¶
type Session struct { // how the user is authenticated. AuthMethod *AuthMethod `protobuf:"bytes,1,opt,name=auth_method,json=authMethod,proto3" json:"auth_method,omitempty"` // if the session is invalidated IsInvalidated bool `protobuf:"varint,2,opt,name=is_invalidated,json=isInvalidated,proto3" json:"is_invalidated,omitempty"` // Timestamp when the session was created. CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // Timestamp when the session was invalidated. InvalidatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=invalidated_at,json=invalidatedAt,proto3" json:"invalidated_at,omitempty"` // Timestamp when the session expires. ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` // Timestamp when the session was renewed. RenewedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=renewed_at,json=renewedAt,proto3" json:"renewed_at,omitempty"` // Country of the session. Country string `protobuf:"bytes,7,opt,name=country,proto3" json:"country,omitempty"` // Postal code of the session. PostalCode int32 `protobuf:"varint,8,opt,name=postal_code,json=postalCode,proto3" json:"postal_code,omitempty"` // contains filtered or unexported fields }
A user's sessions.
func (*Session) Descriptor
deprecated
func (*Session) GetAuthMethod ¶
func (x *Session) GetAuthMethod() *AuthMethod
func (*Session) GetCountry ¶
func (*Session) GetCreatedAt ¶
func (x *Session) GetCreatedAt() *timestamppb.Timestamp
func (*Session) GetExpiresAt ¶
func (x *Session) GetExpiresAt() *timestamppb.Timestamp
func (*Session) GetInvalidatedAt ¶
func (x *Session) GetInvalidatedAt() *timestamppb.Timestamp
func (*Session) GetIsInvalidated ¶
func (*Session) GetPostalCode ¶
func (*Session) GetRenewedAt ¶
func (x *Session) GetRenewedAt() *timestamppb.Timestamp
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
type SessionEntry ¶
type SessionEntry struct { // Session ID of the session. SessionId string `protobuf:"bytes,1,opt,name=session_id,json=sessionId,proto3" json:"session_id,omitempty"` Session *Session `protobuf:"bytes,2,opt,name=session,proto3" json:"session,omitempty"` // Session of the session. // contains filtered or unexported fields }
Session entry
func (*SessionEntry) Descriptor
deprecated
func (*SessionEntry) Descriptor() ([]byte, []int)
Deprecated: Use SessionEntry.ProtoReflect.Descriptor instead.
func (*SessionEntry) GetSession ¶
func (x *SessionEntry) GetSession() *Session
func (*SessionEntry) GetSessionId ¶
func (x *SessionEntry) GetSessionId() string
func (*SessionEntry) ProtoMessage ¶
func (*SessionEntry) ProtoMessage()
func (*SessionEntry) ProtoReflect ¶
func (x *SessionEntry) ProtoReflect() protoreflect.Message
func (*SessionEntry) Reset ¶
func (x *SessionEntry) Reset()
func (*SessionEntry) String ¶
func (x *SessionEntry) String() string
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedServiceServer) Create ¶
func (UnimplementedServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
func (UnimplementedServiceServer) Delete ¶
func (UnimplementedServiceServer) Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
func (UnimplementedServiceServer) Get ¶
func (UnimplementedServiceServer) Get(context.Context, *GetRequest) (*GetResponse, error)
func (UnimplementedServiceServer) GetByIdentifier ¶
func (UnimplementedServiceServer) GetByIdentifier(context.Context, *GetByIdentifierRequest) (*GetByIdentifierResponse, error)
func (UnimplementedServiceServer) List ¶
func (UnimplementedServiceServer) List(context.Context, *ListRequest) (*ListResponse, error)
func (UnimplementedServiceServer) ListSessions ¶
func (UnimplementedServiceServer) ListSessions(context.Context, *ListSessionsRequest) (*ListSessionsResponse, error)
func (UnimplementedServiceServer) Update ¶
func (UnimplementedServiceServer) Update(context.Context, *UpdateRequest) (*UpdateResponse, error)
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.
type Update ¶
type Update struct { // field of the user to update./ // // Types that are assignable to Field: // // *Update_Email // *Update_Username // *Update_PhoneNumber // *Update_Password // *Update_Profile // *Update_IsEmailVerified // *Update_IsPhoneVerified // *Update_ResetSessions_ // *Update_SetMetadata // *Update_DeleteMetadataKey // *Update_HashedPassword Field isUpdate_Field `protobuf_oneof:"field"` // contains filtered or unexported fields }
Update message to update a user.
func (*Update) Descriptor
deprecated
func (*Update) GetDeleteMetadataKey ¶
func (*Update) GetHashedPassword ¶
func (x *Update) GetHashedPassword() *model.HashingInstance
func (*Update) GetIsEmailVerified ¶
func (*Update) GetIsPhoneVerified ¶
func (*Update) GetPassword ¶
func (*Update) GetPhoneNumber ¶
func (*Update) GetProfile ¶
func (*Update) GetResetSessions ¶
func (x *Update) GetResetSessions() *Update_ResetSessions
func (*Update) GetSetMetadata ¶
func (*Update) GetUsername ¶
func (*Update) ProtoMessage ¶
func (*Update) ProtoMessage()
func (*Update) ProtoReflect ¶
func (x *Update) ProtoReflect() protoreflect.Message
type UpdateRequest ¶
type UpdateRequest struct { // The user identifier of the user to update. UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // The updates to apply to the user. Updates []*Update `protobuf:"bytes,2,rep,name=updates,proto3" json:"updates,omitempty"` // contains filtered or unexported fields }
The request of updating a user.
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetUpdates ¶
func (x *UpdateRequest) GetUpdates() []*Update
func (*UpdateRequest) GetUserId ¶
func (x *UpdateRequest) GetUserId() string
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (x *UpdateRequest) String() string
type UpdateResponse ¶
type UpdateResponse struct {
// contains filtered or unexported fields
}
Empty update response.
func (*UpdateResponse) Descriptor
deprecated
func (*UpdateResponse) Descriptor() ([]byte, []int)
Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.
func (*UpdateResponse) ProtoMessage ¶
func (*UpdateResponse) ProtoMessage()
func (*UpdateResponse) ProtoReflect ¶
func (x *UpdateResponse) ProtoReflect() protoreflect.Message
func (*UpdateResponse) Reset ¶
func (x *UpdateResponse) Reset()
func (*UpdateResponse) String ¶
func (x *UpdateResponse) String() string
type Update_DeleteMetadataKey ¶
type Update_DeleteMetadataKey struct { // Delete metadata of the user. DeleteMetadataKey string `protobuf:"bytes,10,opt,name=delete_metadata_key,json=deleteMetadataKey,proto3,oneof"` }
type Update_Email ¶
type Update_Email struct { // Email of the user. Email string `protobuf:"bytes,1,opt,name=email,proto3,oneof"` }
type Update_HashedPassword ¶
type Update_HashedPassword struct { // Hashed password of the user. HashedPassword *model.HashingInstance `protobuf:"bytes,12,opt,name=hashed_password,json=hashedPassword,proto3,oneof"` }
type Update_IsEmailVerified ¶
type Update_IsEmailVerified struct { // Whether the user's email is verified. IsEmailVerified bool `protobuf:"varint,6,opt,name=is_email_verified,json=isEmailVerified,proto3,oneof"` }
type Update_IsPhoneVerified ¶
type Update_IsPhoneVerified struct { // Deprecated: text is not supported - Whether the user's phone number is // verified. IsPhoneVerified bool `protobuf:"varint,7,opt,name=is_phone_verified,json=isPhoneVerified,proto3,oneof"` }
type Update_Password ¶
type Update_Password struct { // Password of the user. Password string `protobuf:"bytes,4,opt,name=password,proto3,oneof"` }
type Update_PhoneNumber ¶
type Update_PhoneNumber struct { // Deprecated: text is not supported - Phone number of the user. PhoneNumber string `protobuf:"bytes,3,opt,name=phone_number,json=phoneNumber,proto3,oneof"` }
type Update_Profile ¶
type Update_Profile struct { // Profile of the user. Profile *Profile `protobuf:"bytes,5,opt,name=profile,proto3,oneof"` }
type Update_ResetSessions ¶
type Update_ResetSessions struct {
// contains filtered or unexported fields
}
if sessions are reset, all sessions will be invalidated and a new session will be created.
func (*Update_ResetSessions) Descriptor
deprecated
func (*Update_ResetSessions) Descriptor() ([]byte, []int)
Deprecated: Use Update_ResetSessions.ProtoReflect.Descriptor instead.
func (*Update_ResetSessions) ProtoMessage ¶
func (*Update_ResetSessions) ProtoMessage()
func (*Update_ResetSessions) ProtoReflect ¶
func (x *Update_ResetSessions) ProtoReflect() protoreflect.Message
func (*Update_ResetSessions) Reset ¶
func (x *Update_ResetSessions) Reset()
func (*Update_ResetSessions) String ¶
func (x *Update_ResetSessions) String() string
type Update_ResetSessions_ ¶
type Update_ResetSessions_ struct { // Reset sessions of the user. ResetSessions *Update_ResetSessions `protobuf:"bytes,8,opt,name=reset_sessions,json=resetSessions,proto3,oneof"` }
type Update_SetMetadata ¶
type Update_Username ¶
type Update_Username struct { // Username of the user. Username string `protobuf:"bytes,2,opt,name=username,proto3,oneof"` }
type User ¶
type User struct { // User ID of the user. UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // User info of the user. UserInfo *model.UserInfo `protobuf:"bytes,2,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"` // Profile of the user. Profile *Profile `protobuf:"bytes,3,opt,name=profile,proto3" json:"profile,omitempty"` // Timestamp when the user was last updated. UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // Register info of the user. RegisterInfo *model.RegisterInfo `protobuf:"bytes,5,opt,name=register_info,json=registerInfo,proto3" json:"register_info,omitempty"` // Deprecated: text is not supported - Whether the user's phone number is // verified. IsPhoneVerified bool `protobuf:"varint,6,opt,name=is_phone_verified,json=isPhoneVerified,proto3" json:"is_phone_verified,omitempty"` // Whether the user's email is verified. IsEmailVerified bool `protobuf:"varint,7,opt,name=is_email_verified,json=isEmailVerified,proto3" json:"is_email_verified,omitempty"` // Timestamp when the user last created a new session. NewSessionsSince *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=new_sessions_since,json=newSessionsSince,proto3" json:"new_sessions_since,omitempty"` // Metadata of the user. Metadata map[string][]byte `` /* 157-byte string literal not displayed */ // contains filtered or unexported fields }
The user model.
func (*User) Descriptor
deprecated
func (*User) GetIsEmailVerified ¶
func (*User) GetIsPhoneVerified ¶
func (*User) GetMetadata ¶
func (*User) GetNewSessionsSince ¶
func (x *User) GetNewSessionsSince() *timestamppb.Timestamp
func (*User) GetProfile ¶
func (*User) GetRegisterInfo ¶
func (x *User) GetRegisterInfo() *model.RegisterInfo
func (*User) GetUpdatedAt ¶
func (x *User) GetUpdatedAt() *timestamppb.Timestamp
func (*User) GetUserInfo ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type VerificationCode ¶
type VerificationCode struct { // Hashed verification code. Code *model.HashingInstance `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // Timestamp when the verification code was sent. SentAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"` // Timestamp when the verification code expires. ExpiresAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"` // Number of attempts to verify the code. Attempts int32 `protobuf:"varint,4,opt,name=attempts,proto3" json:"attempts,omitempty"` // Timestamp of the last attempt to verify the code. LastAttempt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=last_attempt,json=lastAttempt,proto3" json:"last_attempt,omitempty"` // Type of verification code. Type VerificationType `protobuf:"varint,6,opt,name=type,proto3,enum=api.v1.user.VerificationType" json:"type,omitempty"` // User ID of the user who the code was sent to. UserId string `protobuf:"bytes,7,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
short-lived verification code.
func (*VerificationCode) Descriptor
deprecated
func (*VerificationCode) Descriptor() ([]byte, []int)
Deprecated: Use VerificationCode.ProtoReflect.Descriptor instead.
func (*VerificationCode) GetAttempts ¶
func (x *VerificationCode) GetAttempts() int32
func (*VerificationCode) GetCode ¶
func (x *VerificationCode) GetCode() *model.HashingInstance
func (*VerificationCode) GetExpiresAt ¶
func (x *VerificationCode) GetExpiresAt() *timestamppb.Timestamp
func (*VerificationCode) GetLastAttempt ¶
func (x *VerificationCode) GetLastAttempt() *timestamppb.Timestamp
func (*VerificationCode) GetSentAt ¶
func (x *VerificationCode) GetSentAt() *timestamppb.Timestamp
func (*VerificationCode) GetType ¶
func (x *VerificationCode) GetType() VerificationType
func (*VerificationCode) GetUserId ¶
func (x *VerificationCode) GetUserId() string
func (*VerificationCode) ProtoMessage ¶
func (*VerificationCode) ProtoMessage()
func (*VerificationCode) ProtoReflect ¶
func (x *VerificationCode) ProtoReflect() protoreflect.Message
func (*VerificationCode) Reset ¶
func (x *VerificationCode) Reset()
func (*VerificationCode) String ¶
func (x *VerificationCode) String() string
type VerificationType ¶
type VerificationType int32
Type of verification code
const ( // Default value VerificationType_VERIFICATION_TYPE_UNSPECIFIED VerificationType = 0 // Email verification code. VerificationType_VERIFICATION_TYPE_EMAIL VerificationType = 1 // Deprecated: text is not supported - text verification code. VerificationType_VERIFICATION_TYPE_TEXT VerificationType = 2 // reset password verification code. VerificationType_VERIFICATION_TYPE_RESET_PASSWORD VerificationType = 3 )
func (VerificationType) Descriptor ¶
func (VerificationType) Descriptor() protoreflect.EnumDescriptor
func (VerificationType) Enum ¶
func (x VerificationType) Enum() *VerificationType
func (VerificationType) EnumDescriptor
deprecated
func (VerificationType) EnumDescriptor() ([]byte, []int)
Deprecated: Use VerificationType.Descriptor instead.
func (VerificationType) Number ¶
func (x VerificationType) Number() protoreflect.EnumNumber
func (VerificationType) String ¶
func (x VerificationType) String() string
func (VerificationType) Type ¶
func (VerificationType) Type() protoreflect.EnumType