customErrors

package
v0.0.0-...-4a59535 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 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

Types

type ApiError

type ApiError interface {
	CustomError
	// contains filtered or unexported methods
}

func NewApiError

func NewApiError(message string, code int) ApiError

func NewApiErrorWrap

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

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

Jump to

Keyboard shortcuts

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