Documentation
¶
Overview ¶
Package errcode defines the error codes with corresponding HTTP status and message.
Index ¶
Constants ¶
View Source
const ( // ErrUserNotFound - 404: User not found. ErrUserNotFound int = iota + 110001 // ErrUserAlreadyExist - 400: User already exist. ErrUserAlreadyExist )
user errors.
View Source
const ( // ErrSecretNotFound - 404: Secret not found. ErrSecretNotFound int = iota + 110101 // ErrEncrypt - 400: Secret reach the max count. ErrReachMaxCount )
secret errors.
View Source
const ( // ErrSuccess - 200: OK. ErrSuccess int = iota + 100001 // ErrUnknown - 500: Internal server error. ErrUnknown // ErrBadParams - 400: Bad request parameters. ErrBadParams // ErrPageNotFound - 404: Not found. ErrNotFound )
Common: basic errors (1000xx).
View Source
const ( // ErrPasswordInvalid - 401: Password invalid. ErrPasswordInvalid int = iota + 100101 // ErrHeaderInvalid - 401: Authorization header invalid. ErrHeaderInvalid // ErrSignatureInvalid - 401: Signature invalid. ErrSignatureInvalid // ErrTokenInvalid - 401: Token invalid. ErrTokenInvalid // ErrTokenExpired - 401: Token expired. ErrTokenExpired // PermissionDenied - 403: Permission denied. ErrPermissionDenied )
common: authorization / authentication errors (1001xx).
View Source
const ( // ErrDatabase - 500: Database error. ErrDatabase int = iota + 100201 )
common: database errors (1002xx).
View Source
const ( // ErrPolicyNotFound - 404: Policy not found. ErrPolicyNotFound int = iota + 110201 )
policy errors.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.