Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken struct { Token string `gorm:"type:varchar(1024);primary_key"` UserId uuid.UUID `gorm:"not null;index"` User User `gorm:"constraint:OnDelete:CASCADE"` CreatedAt time.Time ExpiresAt time.Time }
func (*AccessToken) TableName ¶
func (*AccessToken) TableName() string
type ResetToken ¶
type ResetToken struct { Token string `gorm:"type:varchar(1024);primary_key"` UserId uuid.UUID `gorm:"not null;index"` User User `gorm:"constraint:OnDelete:CASCADE"` CreatedAt time.Time ExpiresAt time.Time }
func (*ResetToken) TableName ¶
func (*ResetToken) TableName() string
type Scope ¶
type User ¶
type User struct { ID uuid.UUID `gorm:"type:uuid;primary_key;default:gen_random_uuid()"` Email string `gorm:"type:varchar(320);unique;not null"` HashedPassword string `gorm:"type:varchar(1024);not null"` FirstName string `gorm:"type:varchar(120);not null"` LastName string `gorm:"type:varchar(120);not null"` UserTypeId uuid.UUID `gorm:"not null"` UserType UserType IsActive bool `gorm:"type:boolean;not null;default:true"` IsVerified bool `gorm:"type:boolean;not null;default:false"` CreatedAt time.Time UpdatedAt time.Time }
func (*User) SetPassword ¶
func (*User) VerifyPassword ¶
type UserType ¶
type UserType struct { ID uuid.UUID `gorm:"type:uuid;primary_key;default:gen_random_uuid()"` Name string `gorm:"type:varchar(120);unique;not null"` IsDefault bool `gorm:"type:boolean;not null;default:false"` Scopes []Scope `gorm:"many2many:auth_user_type_scopes;"` }
func (*UserType) ScopeNames ¶
type UserValidateError ¶
type UserValidateError struct {
Message string
}
func (*UserValidateError) Error ¶
func (e *UserValidateError) Error() string
Click to show internal directories.
Click to hide internal directories.