customErrors

package
v0.0.0-...-dc7611c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsApiError

func IsApiError(err error, code int) bool

func IsApplicationError

func IsApplicationError(err error, code int) bool

func IsBadRequestError

func IsBadRequestError(err error) bool

func IsConflictError

func IsConflictError(err error) bool

func IsCustomError

func IsCustomError(err error) bool

func IsDomainError

func IsDomainError(err error, code int) bool

func IsForbiddenError

func IsForbiddenError(err error) bool

func IsInternalServerError

func IsInternalServerError(err error) bool

func IsMarshalingError

func IsMarshalingError(err error) bool

func IsNotFoundError

func IsNotFoundError(err error) bool

func IsUnAuthorizedError

func IsUnAuthorizedError(err error) bool

func IsUnMarshalingError

func IsUnMarshalingError(err error) bool

func IsValidationError

func IsValidationError(err error) bool

func NewApiError

func NewApiError(message string, code int) error

func NewApiErrorWrap

func NewApiErrorWrap(err error, code int, message string) error

func NewApplicationError

func NewApplicationError(message string) error

func NewApplicationErrorWithCode

func NewApplicationErrorWithCode(message string, code int) error

func NewApplicationErrorWrap

func NewApplicationErrorWrap(err error, message string) error

func NewApplicationErrorWrapWithCode

func NewApplicationErrorWrapWithCode(err error, code int, message string) error

func NewBadRequestError

func NewBadRequestError(message string) error

func NewBadRequestErrorWrap

func NewBadRequestErrorWrap(err error, message string) error

func NewConflictError

func NewConflictError(message string) error

func NewConflictErrorWrap

func NewConflictErrorWrap(err error, message string) error

func NewDomainError

func NewDomainError(message string) error

func NewDomainErrorWithCode

func NewDomainErrorWithCode(message string, code int) error

func NewDomainErrorWithCodeWrap

func NewDomainErrorWithCodeWrap(err error, code int, message string) error

func NewDomainErrorWrap

func NewDomainErrorWrap(err error, message string) error

func NewForbiddenError

func NewForbiddenError(message string) error

func NewForbiddenErrorWrap

func NewForbiddenErrorWrap(err error, message string) error

func NewInternalServerError

func NewInternalServerError(message string) error

func NewInternalServerErrorWrap

func NewInternalServerErrorWrap(err error, message string) error

func NewMarshalingError

func NewMarshalingError(message string) error

func NewMarshalingErrorWrap

func NewMarshalingErrorWrap(err error, message string) error

func NewNotFoundError

func NewNotFoundError(message string) error

func NewNotFoundErrorWrap

func NewNotFoundErrorWrap(err error, message string) error

func NewUnAuthorizedError

func NewUnAuthorizedError(message string) error

func NewUnAuthorizedErrorWrap

func NewUnAuthorizedErrorWrap(err error, message string) error

func NewUnMarshalingError

func NewUnMarshalingError(message string) error

func NewUnMarshalingErrorWrap

func NewUnMarshalingErrorWrap(err error, message string) error

func NewValidationError

func NewValidationError(message string) error

func NewValidationErrorWrap

func NewValidationErrorWrap(err error, message string) error

Types

type ApiError

type ApiError interface {
	CustomError
	IsApiError() bool
}

type ApplicationError

type ApplicationError interface {
	CustomError
	IsApplicationError() bool
}

type BadRequestError

type BadRequestError interface {
	CustomError
	IsBadRequestError() bool
}

type ConflictError

type ConflictError interface {
	CustomError
	IsConflictError() bool
}

type CustomError

type CustomError interface {
	error
	contracts.Wrapper
	contracts.Causer
	contracts.Formatter
	IsCustomError() bool
	Status() int
	Message() string
}

func GetCustomError

func GetCustomError(err error) CustomError

func NewCustomError

func NewCustomError(err error, code int, message string) CustomError

type DomainError

type DomainError interface {
	CustomError
	IsDomainError() bool
}

type ForbiddenError

type ForbiddenError interface {
	CustomError
	IsForbiddenError() bool
}

type InternalServerError

type InternalServerError interface {
	CustomError
	IsInternalServerError() bool
}

type MarshalingError

type MarshalingError interface {
	InternalServerError
	IsMarshalingError() bool
}

type NotFoundError

type NotFoundError interface {
	CustomError
	IsNotFoundError() bool
}

type UnMarshalingError

type UnMarshalingError interface {
	InternalServerError
	IsUnMarshalingError() bool
}

type UnauthorizedError

type UnauthorizedError interface {
	CustomError
	IsUnAuthorizedError() bool
}

type ValidationError

type ValidationError interface {
	BadRequestError
	IsValidationError() bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL