Documentation ¶
Index ¶
- type BlacklistedTokens
- type UserCheckParams
- type Users
- func (u *Users) DeleteUser() error
- func (u *Users) GeneratePasswordHash() (error, bool)
- func (u *Users) Save() error
- func (userToUpdate *Users) UpdateUser(updateData interface{}, omitFields ...string) (*Users, error)
- func (user *Users) ValidatePasswordHash(password string) (string, bool)
- func (u *Users) ValidateUserExists() (string, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlacklistedTokens ¶
func (*BlacklistedTokens) BlacklistToken ¶
func (t *BlacklistedTokens) BlacklistToken() bool
func (*BlacklistedTokens) IsTokenBlacklisted ¶
func (t *BlacklistedTokens) IsTokenBlacklisted() bool
type UserCheckParams ¶
type Users ¶
type Users struct { gorm.Model Username string `gorm:"unique;not null" json:"username"` Email string `gorm:"unique;not null" json:"email"` Password string `gorm:"not null" json:"password"` IsSuperuser bool `gorm:"default=false;not null" json:"is_superuser"` IsActive bool `gorm:"default=true;not null" json:"is_active"` }
func GetUserById ¶
func ValidateUserExistsWithEmailOrUsername ¶
func ValidateUserExistsWithEmailOrUsername(params UserCheckParams) (*Users, string, bool)
func (*Users) DeleteUser ¶
func (*Users) GeneratePasswordHash ¶
func (*Users) UpdateUser ¶
func (*Users) ValidatePasswordHash ¶
func (*Users) ValidateUserExists ¶
Click to show internal directories.
Click to hide internal directories.