Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type User ¶
type User struct { Id int64 `gorm:"primary_key;column:id" json:"id"` Username string `gorm:"type:varchar(100);unique;column:username;" json:"username,omitempty"` Password string `gorm:"column:password" json:"password,omitempty"` Email string `gorm:"type:varchar(100);column:email" json:"email,omitempty"` ApiKey string `gorm:"column:api_key" json:"api_key,omitempty"` ApiSecret string `gorm:"column:api_secret" json:"api_secret,omitempty"` Admin null.NullBool `gorm:"column:administrator" json:"admin,omitempty"` CreatedAt time.Time `gorm:"column:created_at" json:"created_at"` UpdatedAt time.Time `gorm:"column:updated_at" json:"updated_at"` }
User is the main struct for Users
func AuthUser ¶
AuthUser will return the User and a boolean if authentication was correct. AuthUser accepts username, and password as a string
func FindByUsername ¶
func (*User) BeforeCreate ¶
Click to show internal directories.
Click to hide internal directories.