middlewares

package
v0.0.0-...-89bf0d2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2018 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Middleware

type Middleware func(h http.HandlerFunc) http.HandlerFunc

Middleware is function that wraps a http.HandlerFunc.

func NewAccessLogger

func NewAccessLogger(out io.Writer) Middleware

NewAccessLogger can be used to create a middleware that logs every request with client addr, http method and request uri to the given output writer.

func NewPanicRecovery

func NewPanicRecovery(out io.Writer) Middleware

NewPanicRecovery can be used to create middleware that recovers from panics while handling user requests.

Jump to

Keyboard shortcuts

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