middlewares

package
v0.0.0-...-12c9185 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2018 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(nextHandler http.HandlerFunc) http.HandlerFunc

Authenticate request

func Cache

func Cache(cacheService chronicle.CacheService) func(string, http.HandlerFunc) http.HandlerFunc

Cache http request

func Gzip

func Gzip(next http.Handler) http.Handler

Gzip return response as gzip encoded

func LogRequest

func LogRequest(nextHandler http.Handler) http.Handler

LogRequest with info level every http request, unless production

func PanicHandler

func PanicHandler(nextHandler http.Handler) http.Handler

PanicHandler will return statusCOde 500 and log panic error

func TraceRequest

func TraceRequest(nextHandler http.Handler) http.Handler

TraceRequest add X-Request-ID header to request

Types

This section is empty.

Jump to

Keyboard shortcuts

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