Documentation ¶
Overview ¶
Package code defines the base errors with corresponding error code.
Index ¶
Constants ¶
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).
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.