types

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrHandlers

type ErrHandlers map[error]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 struct {
	// contains filtered or unexported fields
}

func NewRoutesMap added in v0.9.0

func NewRoutesMap() RoutesMap

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