Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CheckIfValidUser ¶
CheckIfValidUser ...
func VerifyPassword ¶
VerifyPassword - compare hashed password and given password.
Types ¶
type User ¶
type User struct { Role string `gorm:"default:user" json:"role"` ID uint32 `gorm:"primary_key;auto_increment" json:"id"` FirstName string `gorm:"size:255;not null" json:"first_name"` LastName string `gorm:"size:255;not null" json:"last_name"` Email string `gorm:"size:100;not null;unique" json:"email"` Phone int64 `gorm:"size:100;unique;not null" json:"phone"` Password string `gorm:"size:100;not null;" json:"password"` Address string `gorm:"size:255" json:"address"` CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"created_at"` UpdatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"updated_at"` }
User ...
func (*User) CreateUser ¶
CreateUser - add new user to DB table.
Click to show internal directories.
Click to hide internal directories.