errcodes

package
v0.0.0-...-642f069 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidationError

func ValidationError(msg string) error

Types

type Error

type Error struct {
	HTTPCode int
	Message  string
	Code     string
}

func (*Error) As

func (err *Error) As(target interface{}) bool

func (*Error) Error

func (err *Error) Error() string

func (*Error) Is

func (err *Error) Is(target error) bool

type Handler

type Handler struct{}

func NewHandler

func NewHandler() *Handler

func (*Handler) Handle

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

Handle is an Echo error handler that uses HTTP errors accordingly, and any generic error will be interpreted as an internal server error.

Jump to

Keyboard shortcuts

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