Documentation ¶
Index ¶
- func IsApiError(err error, code int) bool
- func IsApplicationError(err error, code int) bool
- func IsBadRequestError(err error) bool
- func IsConflictError(err error) bool
- func IsCustomError(err error) bool
- func IsDomainError(err error, code int) bool
- func IsForbiddenError(err error) bool
- func IsInternalServerError(err error) bool
- func IsMarshalingError(err error) bool
- func IsNotFoundError(err error) bool
- func IsUnAuthorizedError(err error) bool
- func IsUnMarshalingError(err error) bool
- func IsValidationError(err error) bool
- type ApiError
- type ApplicationError
- type BadRequestError
- type ConflictError
- type CustomError
- type DomainError
- type ForbiddenError
- type InternalServerError
- type MarshalingError
- type NotFoundError
- type UnMarshalingError
- type UnauthorizedError
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsApiError ¶
func IsApplicationError ¶
func IsBadRequestError ¶
func IsConflictError ¶
func IsCustomError ¶
func IsDomainError ¶
func IsForbiddenError ¶
func IsInternalServerError ¶
func IsMarshalingError ¶
func IsNotFoundError ¶
func IsUnAuthorizedError ¶
func IsUnMarshalingError ¶
func IsValidationError ¶
Types ¶
type ApiError ¶
type ApiError interface { CustomError // contains filtered or unexported methods }
func NewApiError ¶
type ApplicationError ¶
type ApplicationError interface { CustomError // contains filtered or unexported methods }
func NewApplicationError ¶
func NewApplicationError(message string) ApplicationError
func NewApplicationErrorWithCode ¶
func NewApplicationErrorWithCode(message string, code int) ApplicationError
func NewApplicationErrorWrap ¶
func NewApplicationErrorWrap(err error, message string) ApplicationError
func NewApplicationErrorWrapWithCode ¶
func NewApplicationErrorWrapWithCode( err error, code int, message string, ) ApplicationError
type BadRequestError ¶
type BadRequestError interface { CustomError // contains filtered or unexported methods }
func NewBadRequestError ¶
func NewBadRequestError(message string) BadRequestError
func NewBadRequestErrorWrap ¶
func NewBadRequestErrorWrap(err error, message string) BadRequestError
type ConflictError ¶
type ConflictError interface { CustomError // contains filtered or unexported methods }
func NewConflictError ¶
func NewConflictError(message string) ConflictError
func NewConflictErrorWrap ¶
func NewConflictErrorWrap(err error, message string) ConflictError
type CustomError ¶
type CustomError interface { error contracts.Wrapper contracts.Causer contracts.Formatter Status() int Message() string // contains filtered or unexported methods }
func GetCustomError ¶
func GetCustomError(err error) CustomError
func NewCustomError ¶
func NewCustomError(err error, code int, message string) CustomError
type DomainError ¶
type DomainError interface { CustomError // contains filtered or unexported methods }
func NewDomainError ¶
func NewDomainError(message string) DomainError
func NewDomainErrorWithCode ¶
func NewDomainErrorWithCode(message string, code int) DomainError
func NewDomainErrorWithCodeWrap ¶
func NewDomainErrorWithCodeWrap(err error, code int, message string) DomainError
func NewDomainErrorWrap ¶
func NewDomainErrorWrap(err error, message string) DomainError
type ForbiddenError ¶
type ForbiddenError interface { CustomError // contains filtered or unexported methods }
func NewForbiddenError ¶
func NewForbiddenError(message string) ForbiddenError
func NewForbiddenErrorWrap ¶
func NewForbiddenErrorWrap(err error, message string) ForbiddenError
type InternalServerError ¶
type InternalServerError interface { CustomError // contains filtered or unexported methods }
func NewInternalServerError ¶
func NewInternalServerError(message string) InternalServerError
func NewInternalServerErrorWrap ¶
func NewInternalServerErrorWrap(err error, message string) InternalServerError
type MarshalingError ¶
type MarshalingError interface { InternalServerError // contains filtered or unexported methods }
func NewMarshalingError ¶
func NewMarshalingError(message string) MarshalingError
func NewMarshalingErrorWrap ¶
func NewMarshalingErrorWrap(err error, message string) MarshalingError
type NotFoundError ¶
type NotFoundError interface { CustomError // contains filtered or unexported methods }
func NewNotFoundError ¶
func NewNotFoundError(message string) NotFoundError
func NewNotFoundErrorWrap ¶
func NewNotFoundErrorWrap(err error, message string) NotFoundError
type UnMarshalingError ¶
type UnMarshalingError interface { InternalServerError // contains filtered or unexported methods }
func NewUnMarshalingError ¶
func NewUnMarshalingError(message string) UnMarshalingError
func NewUnMarshalingErrorWrap ¶
func NewUnMarshalingErrorWrap(err error, message string) UnMarshalingError
type UnauthorizedError ¶
type UnauthorizedError interface { CustomError // contains filtered or unexported methods }
func NewUnAuthorizedError ¶
func NewUnAuthorizedError(message string) UnauthorizedError
func NewUnAuthorizedErrorWrap ¶
func NewUnAuthorizedErrorWrap(err error, message string) UnauthorizedError
type ValidationError ¶
type ValidationError interface { BadRequestError // contains filtered or unexported methods }
func NewValidationError ¶
func NewValidationError(message string) ValidationError
func NewValidationErrorWrap ¶
func NewValidationErrorWrap(err error, message string) ValidationError
Click to show internal directories.
Click to hide internal directories.