types

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 2 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]HandlerFunc

type HandlerFunc

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

type HandlerObject

type HandlerObject struct {
	Fun         HandlerFunc
	Middlewares []Middleware
}

type MethodsMap

type MethodsMap map[methods.Method]*HandlerObject

type Middleware

type Middleware func(next HandlerFunc, 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]MethodsMap

Jump to

Keyboard shortcuts

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