Documentation ¶
Index ¶
- type RestErr
- func NewBadRequestError(message string) RestErr
- func NewInternalServerError(message string, err error) RestErr
- func NewNoContentError(message string) RestErr
- func NewNotFoundError(message string) RestErr
- func NewRestError(message string, status int, err string, causes []interface{}) RestErr
- func NewRestErrorFromBytes(bytes []byte) (RestErr, error)
- func NewUnauthorizedError(message string) RestErr
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 NewNoContentError ¶ added in v1.0.13
NewNoContentError is used to create a RestErr informing a No Content and a message.
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.
func NewUnauthorizedError ¶ added in v1.0.8
NewUnauthorizedError is used to create a RestErr informing a Unauthorized and a message.