customError

package
v0.0.0-...-0bb06ad Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsApplicationError

func IsApplicationError(e error) bool

func IsBadRequestError

func IsBadRequestError(e error) bool

func IsConflictError

func IsConflictError(e error) bool

func IsCustomError

func IsCustomError(err error) bool

func IsDomainError

func IsDomainError(e error) bool

func IsForbiddenError

func IsForbiddenError(e error) bool

func IsInternalServerError

func IsInternalServerError(e error) bool

func IsMarshalingError

func IsMarshalingError(e error) bool

func IsNotFoundError

func IsNotFoundError(e error) bool

func IsUnAuthorizedError

func IsUnAuthorizedError(e error) bool

func IsUnMarshalingError

func IsUnMarshalingError(e error) bool

func IsValidationError

func IsValidationError(e error) bool

func NewApplicationError

func NewApplicationError(message string, code int, details map[string]string) error

func NewApplicationErrorWrap

func NewApplicationErrorWrap(err error, message string, code int, details map[string]string) error

func NewBadRequestError

func NewBadRequestError(message string, code int, details map[string]string) error

func NewBadRequestErrorWrap

func NewBadRequestErrorWrap(err error, message string, code int, details map[string]string) error

func NewConflictError

func NewConflictError(message string, code int, details map[string]string) error

func NewConflictErrorWrap

func NewConflictErrorWrap(err error, message string, code int, details map[string]string) error

func NewDomainError

func NewDomainError(message string, code int, details map[string]string) error

func NewDomainErrorWrap

func NewDomainErrorWrap(err error, message string, code int, details map[string]string) error

func NewForbiddenError

func NewForbiddenError(message string, code int, details map[string]string) error

func NewForbiddenErrorWrap

func NewForbiddenErrorWrap(err error, message string, code int, details map[string]string) error

func NewInternalServerError

func NewInternalServerError(message string, code int, details map[string]string) error

func NewInternalServerErrorWrap

func NewInternalServerErrorWrap(err error, message string, code int, details map[string]string) error

func NewMarshalingError

func NewMarshalingError(message string, code int, details map[string]string) error

func NewMarshalingErrorWrap

func NewMarshalingErrorWrap(err error, message string, code int, details map[string]string) error

func NewNotFoundError

func NewNotFoundError(message string, code int, details map[string]string) error

func NewNotFoundErrorWrap

func NewNotFoundErrorWrap(err error, message string, code int, details map[string]string) error

func NewUnAuthorizedError

func NewUnAuthorizedError(message string, code int, details map[string]string) error

func NewUnAuthorizedErrorWrap

func NewUnAuthorizedErrorWrap(err error, message string, code int, details map[string]string) error

func NewUnMarshalingError

func NewUnMarshalingError(message string, code int, details map[string]string) error

func NewUnMarshalingErrorWrap

func NewUnMarshalingErrorWrap(err error, message string, code int, details map[string]string) error

func NewValidationError

func NewValidationError(message string, code int, details map[string]string) error

func NewValidationErrorWrap

func NewValidationErrorWrap(err error, message string, code int, details map[string]string) error

Types

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
	IsCustomError() bool
	Message() string
	Code() int
	Details() map[string]string
}

func AsCustomError

func AsCustomError(err error) CustomError

func NewCustomError

func NewCustomError(err error, internalCode int, message string, details map[string]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 {
	CustomError
	IsMarshalingError() bool
}

type NotFoundError

type NotFoundError interface {
	CustomError
	IsNotFoundError() bool
}

type UnMarshalingError

type UnMarshalingError interface {
	CustomError
	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