types

package
v0.10.5 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catcher added in v0.10.5

type Catcher struct {
	Prefix  string
	Handler Handler
}

type ErrHandlers

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

func NewErrHandlers added in v0.9.2

func NewErrHandlers() *ErrHandlers

func (*ErrHandlers) Get added in v0.9.2

func (e *ErrHandlers) Get(err status.HTTPError) Handler

func (*ErrHandlers) Set added in v0.9.2

func (e *ErrHandlers) Set(code status.Code, handler Handler)

func (*ErrHandlers) SetUniversal added in v0.9.2

func (e *ErrHandlers) SetUniversal(universal Handler)

type Handler added in v0.8.1

type Handler func(*http.Request) *http.Response

type MethodsMap

type MethodsMap [method.Count]Handler

type Middleware

type Middleware func(next Handler, request *http.Request) *http.Response

Middleware works like a chain of nested calls, next may be even directly handler. But if we are not a closing middleware, we will call next middleware that is simply a partial middleware with already provided next

type RoutesMap

type RoutesMap map[string]routesMapEntry

func (RoutesMap) Add added in v0.9.0

func (r RoutesMap) Add(path string, m method.Method, handler Handler)

func (RoutesMap) Get added in v0.9.0

func (r RoutesMap) Get(path string) (MethodsMap, string, bool)

Jump to

Keyboard shortcuts

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