Documentation ¶
Index ¶
- type AccessToken
- type Account
- func (a *Account) HashPassword()
- func (a *Account) IsNotConfirmed() bool
- func (a *Account) SetApplicationAdminTrue() *Account
- func (a *Account) SetIsConfirmedTrue() *Account
- func (a *Account) SetNewAccountData() *Account
- func (a *Account) SetNewPassword(password string) *Account
- func (a *Account) ToGetAccountDataResponse(permissions []string) *proto.GetAccountDataResponse
- func (a *Account) ToLoginResponse(accessToken, refreshToken string, expiresAt time.Time) *authEntities.LoginResponse
- func (a *Account) ToResponse() *Response
- func (a *Account) ToTokenData() *tokenEntities.TokenData
- func (a *Account) Update() *Account
- func (a *Account) UpdateFromUpdateAccountData(data *UpdateAccount)
- type ChangePasswordData
- type CheckEmailAndUsername
- type Data
- type Email
- type RefreshToken
- type ResetCodeData
- type Response
- type UpdateAccount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken struct {
AccessToken string `json:"accessToken"`
}
func (*AccessToken) ToBytes ¶
func (a *AccessToken) ToBytes() []byte
func (*AccessToken) Validate ¶
func (a *AccessToken) Validate() error
type Account ¶
type Account struct { AccountID uuid.UUID `json:"accountID" gorm:"primary_key"` Email string `json:"email"` Password string `json:"password"` Username string `json:"username"` IsConfirmed bool `json:"isConfirmed"` IsApplicationAdmin bool `json:"isApplicationAdmin"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
func (*Account) HashPassword ¶
func (a *Account) HashPassword()
func (*Account) IsNotConfirmed ¶
func (*Account) SetApplicationAdminTrue ¶
func (*Account) SetIsConfirmedTrue ¶
func (*Account) SetNewAccountData ¶
func (*Account) SetNewPassword ¶
func (*Account) ToGetAccountDataResponse ¶
func (a *Account) ToGetAccountDataResponse(permissions []string) *proto.GetAccountDataResponse
func (*Account) ToLoginResponse ¶
func (a *Account) ToLoginResponse(accessToken, refreshToken string, expiresAt time.Time) *authEntities.LoginResponse
func (*Account) ToResponse ¶
func (*Account) ToTokenData ¶
func (a *Account) ToTokenData() *tokenEntities.TokenData
func (*Account) UpdateFromUpdateAccountData ¶
func (a *Account) UpdateFromUpdateAccountData(data *UpdateAccount)
type ChangePasswordData ¶
type ChangePasswordData struct { Password string `json:"password"` AccountID uuid.UUID `json:"accountID" swaggerignore:"true"` }
func (*ChangePasswordData) SetAccountID ¶
func (c *ChangePasswordData) SetAccountID(accountID uuid.UUID) *ChangePasswordData
func (*ChangePasswordData) ToBytes ¶
func (c *ChangePasswordData) ToBytes() []byte
func (*ChangePasswordData) Validate ¶
func (c *ChangePasswordData) Validate() error
type CheckEmailAndUsername ¶
func (*CheckEmailAndUsername) ToBytes ¶
func (c *CheckEmailAndUsername) ToBytes() []byte
func (*CheckEmailAndUsername) Validate ¶
func (c *CheckEmailAndUsername) Validate() error
type Data ¶
type RefreshToken ¶
type RefreshToken struct {
RefreshToken string `json:"refreshToken"`
}
func (*RefreshToken) ToBytes ¶
func (r *RefreshToken) ToBytes() []byte
func (*RefreshToken) Validate ¶
func (r *RefreshToken) Validate() error
type ResetCodeData ¶
func (*ResetCodeData) ToBytes ¶
func (r *ResetCodeData) ToBytes() []byte
func (*ResetCodeData) Validate ¶
func (r *ResetCodeData) Validate() error
nolint // valid magic number
type Response ¶
type Response struct { AccountID uuid.UUID `json:"accountID" gorm:"primary_key"` Email string `json:"email"` Username string `json:"username"` IsConfirmed bool `json:"isConfirmed"` IsApplicationAdmin bool `json:"isApplicationAdmin"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` }
type UpdateAccount ¶
type UpdateAccount struct { AccountID uuid.UUID `json:"accountID" swaggerignore:"true"` Email string `json:"email"` Username string `json:"username"` IsConfirmed bool `json:"isConfirmed" swaggerignore:"true"` }
func (*UpdateAccount) HasEmailChange ¶
func (u *UpdateAccount) HasEmailChange(email string) bool
func (*UpdateAccount) SetAccountIDAndIsConfirmed ¶
func (u *UpdateAccount) SetAccountIDAndIsConfirmed(accountID uuid.UUID, isConfirmed bool) *UpdateAccount
func (*UpdateAccount) ToBytes ¶
func (u *UpdateAccount) ToBytes() []byte
func (*UpdateAccount) Validate ¶
func (u *UpdateAccount) Validate() error
Click to show internal directories.
Click to hide internal directories.