Documentation ¶
Index ¶
- func IsBadRequestError(e error) bool
- func IsCustomError(err error) bool
- func IsInternalServerError(e error) bool
- func IsNotFoundError(e error) bool
- func IsValidationError(e error) bool
- func NewBadRequestError(message string, code int, details map[string]string) error
- func NewBadRequestErrorWrap(err error, message string, code int, details map[string]string) error
- func NewInternalServerError(message string, code int, details map[string]string) error
- func NewInternalServerErrorWrap(err error, message string, code int, details map[string]string) error
- func NewNotFoundError(message string, code int, details map[string]string) error
- func NewNotFoundErrorWrap(err error, message string, code int, details map[string]string) error
- func NewValidationError(message string, code int, details map[string]string) error
- func NewValidationErrorWrap(err error, message string, code int, details map[string]string) error
- type BadRequestError
- type CustomError
- type InternalServerError
- type NotFoundError
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsBadRequestError ¶
func IsCustomError ¶
func IsInternalServerError ¶
func IsNotFoundError ¶
func IsValidationError ¶
func NewBadRequestError ¶
func NewBadRequestErrorWrap ¶
func NewInternalServerError ¶
func NewNotFoundError ¶
func NewNotFoundErrorWrap ¶
func NewValidationError ¶
Types ¶
type BadRequestError ¶
type BadRequestError interface { CustomError IsBadRequestError() bool }
type CustomError ¶
type CustomError interface { error IsCustomError() bool Message() string Code() int Details() map[string]string }
func AsCustomError ¶
func AsCustomError(err error) CustomError
func NewCustomError ¶
type InternalServerError ¶
type InternalServerError interface { CustomError IsInternalServerError() bool }
type NotFoundError ¶
type NotFoundError interface { CustomError IsNotFoundError() bool }
type ValidationError ¶
type ValidationError interface { BadRequestError IsValidationError() bool }
Click to show internal directories.
Click to hide internal directories.