middleware

package
v0.0.30 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestIDCtxKey = request(iota)
	RequestProtocolCtxKey
	RequestMethodCtxKey
	RequestPathCtxKey
)

Variables

This section is empty.

Functions

func Request added in v0.0.23

func Request(h http.Handler) http.Handler

Request is a server level middleware. It is called on every request in order to add request specific values to the current context for later use. This includes, but not limited to, logging key-value pairs.

func Router

func Router(h http.HandlerFunc, middleware ...rtr) http.HandlerFunc

Router allows router level middleware chaining. The first middleware in the chain runs last. Server level middleware always take precedence over router level middleware.

Types

This section is empty.

Jump to

Keyboard shortcuts

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