Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { gorm.Model Name string `json:"name" binding:"required"` Email string `json:"email" binding:"required" gorm:"unique"` Password string `json:"password" binding:"required"` }
func (*User) CheckPassword ¶
Checks the providedPassword for against the user.Password field
func (*User) HashPassword ¶
Takes a password string as a parameter and encrypts it using bcrypt, saves the result into user.Password field
Click to show internal directories.
Click to hide internal directories.