Documentation ¶
Index ¶
- func NewError(msg string) error
- type RestErr
- func NewBadRequestError(message string) RestErr
- func NewInternalServerError(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 NewUnauthorized(message string) RestErr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RestErr ¶
func NewBadRequestError ¶
NewBadRequestError returns a standardized struct with the correct status,
* and error tag for bad request situations * Args: * message (string): The message to be assigned to the struct's Message field
func NewInternalServerError ¶
NewInternalServerError returns a standardized struct with the correct status,
* and error tag for internal error situations * Args: * message (string): The message to be assigned to the struct's Message field
func NewNotFoundError ¶
NewNotFoundError returns a standardized struct with the correct status,
* and error tag for not found situations * Args: * message (string): The message to be assigned to the struct's Message field
func NewRestError ¶
func NewRestErrorFromBytes ¶
func NewUnauthorized ¶
NewUnauthorized returns a standardized struct with the correct status,
* and error tag for unauthorized access situations * Args: * message (string): The message to be assigned to the struct's Message field
Click to show internal directories.
Click to hide internal directories.