errors

package
v0.0.0-...-ab7f595 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewErrorHandler

func NewErrorHandler(opts ...Option) alanis.MiddlewareFunc

Types

type ErrorFunc

type ErrorFunc func(ctx *alanis.Context, err error)

type HttpError

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

func Error

func Error(code int, error string) HttpError

func Errorf

func Errorf(code int, error string, args ...interface{}) HttpError

func (HttpError) Error

func (e HttpError) Error() string

func (HttpError) String

func (e HttpError) String() string

type Option

type Option func(m *middleware)

func WithFunction

func WithFunction(fn ErrorFunc) Option

Jump to

Keyboard shortcuts

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