httperr

package
v0.0.0-...-1dae7f3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultHandler = &Handler{}

Functions

func Handle

func Handle() func(err error, c echo.Context)

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(opts ...Option) *Handler

func (*Handler) Handle

func (h *Handler) Handle() func(err error, c echo.Context)

func (*Handler) WithMap

func (h *Handler) WithMap(statusCode int, errs ...error) Option

func (*Handler) WithMapFunc

func (h *Handler) WithMapFunc(m Map) Option

type Map

type Map func(err error) (int, bool)

type Mappings

type Mappings []Map

type Option

type Option func(h *Handler)

type ProblemDetails

type ProblemDetails struct {
	Type     string `json:"type"`
	Title    string `json:"title"`
	Status   int    `json:"status"`
	Detail   string `json:"detail"`
	Instance string `json:"instance"`
}

Jump to

Keyboard shortcuts

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