mid

package
v0.0.0-...-21074f7 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2019 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 MiddlewareFunc

type MiddlewareFunc func(w http.ResponseWriter, r *http.Request)

MiddlewareFunc shortcut for handler func

func JSONHeaderMiddleware

func JSONHeaderMiddleware(f MiddlewareFunc) MiddlewareFunc

JSONHeaderMiddleware sets response as JSON

func LoggingMiddleware

func LoggingMiddleware(app *app.App, f MiddlewareFunc) MiddlewareFunc

LoggingMiddleware add messages to output for each request

func PanicMiddleware

func PanicMiddleware(app *app.App, f MiddlewareFunc) MiddlewareFunc

PanicMiddleware return 500 http status if some panic happen

func RootMiddleware

func RootMiddleware(f MiddlewareFunc) MiddlewareFunc

RootgMiddleware ignore sub pathes

Jump to

Keyboard shortcuts

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