Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { // Code stores the error code. Code StatusCode // Message stores the error message. Message string }
Error stores the error message and code.
type StatusCode ¶
type StatusCode int
StatusCode is used as a key for error codes.
const ( // CodeInternal indicates an internal server error. CodeInternal StatusCode = iota // CodeNotFound indicates a not found error. CodeNotFound // CodeAlreadyExists indicates errors that already exist. CodeAlreadyExists // CodeInvalidArgument indicates an invalid argument error. CodeInvalidArgument )
Click to show internal directories.
Click to hide internal directories.