Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultPasswordCost = 12 DefaultExpirationDelta = 30 * 24 * time.Hour )
Variables ¶
View Source
var ( True = true False = false )
Functions ¶
This section is empty.
Types ¶
type Log ¶ added in v0.0.26
type Log struct { Model User *User `json:"user,omitempty" gorm:"foreignKey:UserUUID;constraint:OnUpdate:CASCADE"` UserUUID uuid.UUID `json:"userUUID" gorm:"not null;"` Action string `json:"action" gorm:"not null"` IpAddress string `json:"ipaddr" gorm:"not null"` LogTime time.Time `json:"logTime" gorm:"not null;default:CURRENT_TIMESTAMP"` }
type Model ¶ added in v0.0.19
type User ¶ added in v0.0.19
type User struct { Model Username *string `json:"username,omitempty" gorm:"unique;not null;"` Password string `json:"password,omitempty" gorm:"-"` PasswordHash []byte `json:"-" gorm:"not null;"` }
func RandomUser ¶ added in v0.0.19
func RandomUser() *User
func (*User) Authenticate ¶ added in v0.0.19
func (*User) FromClaims ¶ added in v0.0.19
Click to show internal directories.
Click to hide internal directories.