Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNameRequired = errors.New("name is required and can't be empty") ErrIdRequired = errors.New("id is required and can't be empty") ErrLoginRequired = errors.New("login is required and can't be empty") ErrPasswordRequired = errors.New("password is required and can't be empty") ErrPasswordLength = errors.New("password must be at least 6 characters long") )
Functions ¶
Types ¶
type User ¶
type User struct {
ID int64 `json:"id"`
Name string `json:"name"`
Login string `json:"login"`
Password string `json:"password"`
CreatedAt time.Time `json:"created_at"`
ModifiedAt time.Time `json:"modified_at"`
Deleted bool `json:"-"`
LastLogin time.Time `json:"last_login"`
}
func (*User) SetPassword ¶
Click to show internal directories.
Click to hide internal directories.