handlers

package
v0.0.0-...-d389d3b Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsError

func AsError[T error](err error) *T

Types

type APIErrorTypeHandler

type APIErrorTypeHandler struct{}

func (APIErrorTypeHandler) Handle

func (APIErrorTypeHandler) IsSupported

func (a APIErrorTypeHandler) IsSupported(err error) bool

func (APIErrorTypeHandler) Priority

func (a APIErrorTypeHandler) Priority() int

type DomainErrorTypeHandler

type DomainErrorTypeHandler struct{}

func (DomainErrorTypeHandler) Handle

func (DomainErrorTypeHandler) IsSupported

func (d DomainErrorTypeHandler) IsSupported(err error) bool

func (DomainErrorTypeHandler) Priority

func (d DomainErrorTypeHandler) Priority() int

type ErrorResponseManager

type ErrorResponseManager interface {
	Handle(err error) *response.APIResponseEnvelope
}

func NewErrorResponseManager

func NewErrorResponseManager(errorTypeHandlers []ErrorTypeResponseHandler) ErrorResponseManager

type ErrorTypeResponseHandler

type ErrorTypeResponseHandler interface {
	IsSupported(err error) bool
	Handle(err error) *response.APIResponseEnvelope
	Priority() int
}

func NewAPIErrorTypeHandler

func NewAPIErrorTypeHandler() ErrorTypeResponseHandler

func NewDomainErrorTypeHandler

func NewDomainErrorTypeHandler() ErrorTypeResponseHandler

func NewValidationErrorTypeHandler

func NewValidationErrorTypeHandler() ErrorTypeResponseHandler

func NewValidationFieldErrorTypeHandler

func NewValidationFieldErrorTypeHandler() ErrorTypeResponseHandler

func NewValidationGoPlaygroundErrorHandler

func NewValidationGoPlaygroundErrorHandler() ErrorTypeResponseHandler

type ValidationErrorTypeHandler

type ValidationErrorTypeHandler struct{}

func (ValidationErrorTypeHandler) Handle

func (ValidationErrorTypeHandler) IsSupported

func (a ValidationErrorTypeHandler) IsSupported(err error) bool

func (ValidationErrorTypeHandler) Priority

func (a ValidationErrorTypeHandler) Priority() int

type ValidationFieldErrorTypeHandler

type ValidationFieldErrorTypeHandler struct{}

func (ValidationFieldErrorTypeHandler) Handle

func (ValidationFieldErrorTypeHandler) IsSupported

func (a ValidationFieldErrorTypeHandler) IsSupported(err error) bool

func (ValidationFieldErrorTypeHandler) Priority

func (a ValidationFieldErrorTypeHandler) Priority() int

type ValidationGoPlaygroundErrorHandler

type ValidationGoPlaygroundErrorHandler struct{}

func (ValidationGoPlaygroundErrorHandler) Handle

func (ValidationGoPlaygroundErrorHandler) IsSupported

func (v ValidationGoPlaygroundErrorHandler) IsSupported(err error) bool

func (ValidationGoPlaygroundErrorHandler) Priority

Jump to

Keyboard shortcuts

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