Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TempUser ¶
type TempUser struct { FirstName string `json:"first_name" validate:"required,gte=4"` LastName string `json:"last_name" validate:"required,gte=4"` Email string `json:"email" validate:"required,contains=@"` Password string `json:"-" validate:"required,gte=8"` ConfirmPassword string `json:"-" validate:"required,gte=8"` }
TempUser - the temp user for creating new user
type User ¶
type User struct { ID int64 `json:"id" xorm:"'id' pk autoincr" schema:"id"` FirstName string `json:"first_name" xorm:"first_name" schema:"first_name" validate:"required,gte=4"` LastName string `json:"last_name" xorm:"last_name" schema:"last_name" validate:"required,gte=4"` Email string `json:"email" xorm:"email" schema:"email" validate:"required,contains=@"` Password string `json:"-" xorm:"password" schema:"password" validate:"required,gte=8"` Visible bool `json:"visible" xorm:"visible" schema:"visible"` }
User - the user in the system
func (*User) Authenticate ¶
Authenticate - authenticates a password agians the stored hash
func (*User) SetPassword ¶
SetPassword - use bcrypt to set the password hash
Click to show internal directories.
Click to hide internal directories.