Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMissingUsername means username is empty ErrMissingUsername = newAPPError(http.StatusBadRequest, 40001, "username is empty") // ErrMissingPassword means password is empty ErrMissingPassword = newAPPError(http.StatusBadRequest, 40002, "password is empty") )
View Source
var ( // ErrMissingToken means missing token in header ErrMissingToken = newAPPError(http.StatusUnauthorized, 40100, "missing token") // ErrAuthHeaderFormat means must provide Authorization header with format `Bearer {token}` ErrAuthHeaderFormat = newAPPError(http.StatusUnauthorized, 40101, "Must provide Authorization header with format `Bearer {token}`") // ErrPassword means password not equal ErrPassword = newAPPError(http.StatusUnauthorized, 40102, "password not equal") )
View Source
var ( // ErrGetUserByUsername means get user by username is failure ErrGetUserByUsername = newAPPError(http.StatusInternalServerError, 50001, "get user by username is failure") // ErrEncryptPassword means encrypt password is failure ErrEncryptPassword = newAPPError(http.StatusInternalServerError, 50002, "encrypt password is failure") // ErrSignup means signup is failure ErrSignup = newAPPError(http.StatusInternalServerError, 50003, "signup is failure") // ErrUsernameExists means username is exists ErrUsernameExists = newAPPError(http.StatusInternalServerError, 50004, "username is exists") )
View Source
var ( // ErrRateLimit means too many requests ErrRateLimit = newAPPError(http.StatusTooManyRequests, 42900, "too many requests") )
View Source
var ( // ErrUserNotExists means user is not exists ErrUserNotExists = newAPPError(http.StatusNotFound, 40400, "user is not exists") )
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.