Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( UserNotFound = errors.New("user is not found") ErrUserEdit = errors.New("edit user has failed") ErrUserDelete = errors.New("delete user has failed") ErrUserCreate = errors.New("create user has failed") ErrUserExists = errors.New("user already exists") ErrUserGet = errors.New("get user has failed") ErrInvalidPassword = errors.New("invalid password") )
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { ID UserID `db:"id"` Username string `db:"username"` Password string `db:"password"` FirstName string `db:"first_name"` LastName string `db:"last_name"` Email string `db:"email"` Phone string `db:"phone"` }
User - model of user
type UserID ¶
type UserID int64
UserID - surrogate key of the user table
func UserIDFromString ¶
UserIDFromString convert string to UserID type
Click to show internal directories.
Click to hide internal directories.