Documentation
¶
Index ¶
- Variables
- type Entity
- func (*Entity) Descriptor() ([]byte, []int)deprecated
- func (x *Entity) GetCreatedAt() *timestamppb.Timestamp
- func (x *Entity) GetEmail() string
- func (x *Entity) GetId() string
- func (x *Entity) GetPassword() string
- func (x *Entity) GetUpdatedAt() *timestamppb.Timestamp
- func (x *Entity) GetUsername() string
- func (*Entity) ProtoMessage()
- func (x *Entity) ProtoReflect() protoreflect.Message
- func (x *Entity) Reset()
- func (x *Entity) String() string
- func (m *Entity) Validate() error
- func (m *Entity) ValidateAll() error
- type EntityMultiError
- type EntityValidationError
- type LookupEntityKeys
- func (LookupEntityKeys) Descriptor() protoreflect.EnumDescriptor
- func (x LookupEntityKeys) Enum() *LookupEntityKeys
- func (LookupEntityKeys) EnumDescriptor() ([]byte, []int)deprecated
- func (x LookupEntityKeys) Number() protoreflect.EnumNumber
- func (x LookupEntityKeys) String() string
- func (LookupEntityKeys) Type() protoreflect.EnumType
- type Session
- func (*Session) Descriptor() ([]byte, []int)deprecated
- func (x *Session) GetCreatedAt() *timestamppb.Timestamp
- func (x *Session) GetExpiresAt() *timestamppb.Timestamp
- func (x *Session) GetId() string
- func (x *Session) GetRefreshToken() string
- func (x *Session) GetToken() string
- func (x *Session) GetUserId() string
- func (*Session) ProtoMessage()
- func (x *Session) ProtoReflect() protoreflect.Message
- func (x *Session) Reset()
- func (x *Session) String() string
- func (m *Session) Validate() error
- func (m *Session) ValidateAll() error
- type SessionMultiError
- type SessionValidationError
Constants ¶
This section is empty.
Variables ¶
var ( LookupEntityKeys_name = map[int32]string{ 0: "LOOKUP_ENTITY_KEY_UNSPECIFIED", 1: "LOOKUP_ENTITY_KEY_ID", 2: "LOOKUP_ENTITY_KEY_USERNAME", 3: "LOOKUP_ENTITY_KEY_EMAIL", } LookupEntityKeys_value = map[string]int32{ "LOOKUP_ENTITY_KEY_UNSPECIFIED": 0, "LOOKUP_ENTITY_KEY_ID": 1, "LOOKUP_ENTITY_KEY_USERNAME": 2, "LOOKUP_ENTITY_KEY_EMAIL": 3, } )
Enum value maps for LookupEntityKeys.
var File_core_authentication_basic_v1_service_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Entity ¶
type Entity struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bun:"id" csv:"id" pg:"id" yaml:"id"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username" bun:"username" csv:"username" pg:"username" yaml:"username"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password" bun:"password" csv:"password" pg:"password" yaml:"password"` Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email" bun:"email" csv:"email" pg:"email" yaml:"email"` CreatedAt *timestamppb.Timestamp `` /* 146-byte string literal not displayed */ UpdatedAt *timestamppb.Timestamp `` /* 146-byte string literal not displayed */ // contains filtered or unexported fields }
Entity the basic representation of a user or actor operating in the system with fields for ID, username, password, email, and timestamps for creation and updates of the Entity values. A combination of these fields uniquely identifies an entity within the system and allows for authentication.
func (*Entity) Descriptor
deprecated
func (*Entity) GetCreatedAt ¶
func (x *Entity) GetCreatedAt() *timestamppb.Timestamp
func (*Entity) GetPassword ¶
func (*Entity) GetUpdatedAt ¶
func (x *Entity) GetUpdatedAt() *timestamppb.Timestamp
func (*Entity) GetUsername ¶
func (*Entity) ProtoMessage ¶
func (*Entity) ProtoMessage()
func (*Entity) ProtoReflect ¶
func (x *Entity) ProtoReflect() protoreflect.Message
func (*Entity) Validate ¶
Validate checks the field values on Entity with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Entity) ValidateAll ¶
ValidateAll checks the field values on Entity with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in EntityMultiError, or nil if none found.
type EntityMultiError ¶
type EntityMultiError []error
EntityMultiError is an error wrapping multiple validation errors returned by Entity.ValidateAll() if the designated constraints aren't met.
func (EntityMultiError) AllErrors ¶
func (m EntityMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (EntityMultiError) Error ¶
func (m EntityMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type EntityValidationError ¶
type EntityValidationError struct {
// contains filtered or unexported fields
}
EntityValidationError is the validation error returned by Entity.Validate if the designated constraints aren't met.
func (EntityValidationError) Cause ¶
func (e EntityValidationError) Cause() error
Cause function returns cause value.
func (EntityValidationError) Error ¶
func (e EntityValidationError) Error() string
Error satisfies the builtin error interface
func (EntityValidationError) ErrorName ¶
func (e EntityValidationError) ErrorName() string
ErrorName returns error name.
func (EntityValidationError) Field ¶
func (e EntityValidationError) Field() string
Field function returns field value.
func (EntityValidationError) Key ¶
func (e EntityValidationError) Key() bool
Key function returns key value.
func (EntityValidationError) Reason ¶
func (e EntityValidationError) Reason() string
Reason function returns reason value.
type LookupEntityKeys ¶
type LookupEntityKeys int32
Valid keys for looking up an entity
const ( LookupEntityKeys_LOOKUP_ENTITY_KEY_UNSPECIFIED LookupEntityKeys = 0 LookupEntityKeys_LOOKUP_ENTITY_KEY_ID LookupEntityKeys = 1 LookupEntityKeys_LOOKUP_ENTITY_KEY_USERNAME LookupEntityKeys = 2 LookupEntityKeys_LOOKUP_ENTITY_KEY_EMAIL LookupEntityKeys = 3 )
func (LookupEntityKeys) Descriptor ¶
func (LookupEntityKeys) Descriptor() protoreflect.EnumDescriptor
func (LookupEntityKeys) Enum ¶
func (x LookupEntityKeys) Enum() *LookupEntityKeys
func (LookupEntityKeys) EnumDescriptor
deprecated
func (LookupEntityKeys) EnumDescriptor() ([]byte, []int)
Deprecated: Use LookupEntityKeys.Descriptor instead.
func (LookupEntityKeys) Number ¶
func (x LookupEntityKeys) Number() protoreflect.EnumNumber
func (LookupEntityKeys) String ¶
func (x LookupEntityKeys) String() string
func (LookupEntityKeys) Type ¶
func (LookupEntityKeys) Type() protoreflect.EnumType
type Session ¶
type Session struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bun:"id" csv:"id" pg:"id" yaml:"id"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id" bun:"user_id" csv:"user_id" pg:"user_id" yaml:"user_id"` Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token" bun:"token" csv:"token" pg:"token" yaml:"token"` RefreshToken string `` /* 167-byte string literal not displayed */ CreatedAt *timestamppb.Timestamp `` /* 146-byte string literal not displayed */ ExpiresAt *timestamppb.Timestamp `` /* 146-byte string literal not displayed */ // contains filtered or unexported fields }
Session is time bound authentication token that is issued to a user upon successful login. It contains the user ID, a unique token, and timestamps for when the session was created and when it expires. The token is used to authenticate the user in subsequent requests, allowing them to access protected resources without needing to re-enter their credentials.
func (*Session) Descriptor
deprecated
func (*Session) GetCreatedAt ¶
func (x *Session) GetCreatedAt() *timestamppb.Timestamp
func (*Session) GetExpiresAt ¶
func (x *Session) GetExpiresAt() *timestamppb.Timestamp
func (*Session) GetRefreshToken ¶
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
func (*Session) Validate ¶
Validate checks the field values on Session with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Session) ValidateAll ¶
ValidateAll checks the field values on Session with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SessionMultiError, or nil if none found.
type SessionMultiError ¶
type SessionMultiError []error
SessionMultiError is an error wrapping multiple validation errors returned by Session.ValidateAll() if the designated constraints aren't met.
func (SessionMultiError) AllErrors ¶
func (m SessionMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (SessionMultiError) Error ¶
func (m SessionMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type SessionValidationError ¶
type SessionValidationError struct {
// contains filtered or unexported fields
}
SessionValidationError is the validation error returned by Session.Validate if the designated constraints aren't met.
func (SessionValidationError) Cause ¶
func (e SessionValidationError) Cause() error
Cause function returns cause value.
func (SessionValidationError) Error ¶
func (e SessionValidationError) Error() string
Error satisfies the builtin error interface
func (SessionValidationError) ErrorName ¶
func (e SessionValidationError) ErrorName() string
ErrorName returns error name.
func (SessionValidationError) Field ¶
func (e SessionValidationError) Field() string
Field function returns field value.
func (SessionValidationError) Key ¶
func (e SessionValidationError) Key() bool
Key function returns key value.
func (SessionValidationError) Reason ¶
func (e SessionValidationError) Reason() string
Reason function returns reason value.