Documentation
¶
Index ¶
- type RestErr
- func NewBadRequestError(message string) RestErr
- func NewInternalServerError(message string, err error) RestErr
- func NewNotFoundError(message string) RestErr
- func NewRestError(message string, status int, err string, causes []interface{}) RestErr
- func NewRestErrorFromBytes(bytes []byte) (RestErr, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RestErr ¶
RestErr is the base structure for error responses
func NewBadRequestError ¶
NewBadRequestError is used to create a RestErr informing a BadRequest and a message.
func NewInternalServerError ¶
NewInternalServerError is used to create a RestErr informing a InternalServerError, a message, and an error as cause.
func NewNotFoundError ¶
NewNotFoundError is used to create a RestErr informing a NotFound and a message.
func NewRestError ¶
NewRestError is the function to create a new RestError.
func NewRestErrorFromBytes ¶
NewRestErrorFromBytes is the function to create a new RestError from bytes.
Click to show internal directories.
Click to hide internal directories.