Documentation
¶
Index ¶
- Variables
- func ValidateChangePassword(v *validator.Validator, currentpassword, newpassword, confirmpassword string)
- func ValidateEmail(v *validator.Validator, email string)
- func ValidatePasswordPlaintext(v *validator.Validator, password string)
- func ValidatePhoneNo(v *validator.Validator, phoneNo string)
- func ValidateUser(v *validator.Validator, user *User)
- type Models
- type Password
- type User
- type UserModel
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRecordNotFound = errors.New("record not found") ErrEditConflict = errors.New("edit conflict") ErrInvalidCredentials = errors.New("invalid credentials") )
View Source
var ( ErrDuplicateEmail = errors.New("duplicate email") ErrDuplicatePhoneNo = errors.New("duplicate phone number") )
View Source
var AnonymousUser = &User{}
Functions ¶
func ValidateChangePassword ¶
func ValidateEmail ¶
func ValidatePhoneNo ¶
func ValidateUser ¶
Types ¶
type User ¶
type User struct { ID int64 `json:"id"` CreatedAt time.Time `json:"created_at"` FullName string `json:"full_name"` Username string `json:"username"` Email string `json:"email"` PhoneNo string `json:"phone_no"` Password Password `json:"-"` Activated bool `json:"activated"` Admin bool `json:"admin"` PhoneNoVerified bool `json:"phone_no_verified"` Version int `json:"-"` }
func (*User) IsAnonymous ¶
Click to show internal directories.
Click to hide internal directories.