middleware

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chain

func Chain(handler http.Handler, middleware ...Wrapper) http.Handler

Chain is used to chain mutliple middleware calls for http handlers

func WithLogging

func WithLogging(log *zap.Logger) func(http.Handler) http.HandlerFunc

WithLogging provides request logging for an http handler.

func WithPanicHandling

func WithPanicHandling(f http.Handler) http.HandlerFunc

WithPanicHandling is used to handle all panics on the handlers and pass back an error

Types

type Wrapper

type Wrapper func(http.Handler) http.HandlerFunc

Wrapper is a helper type for declraing the chain segments

Jump to

Keyboard shortcuts

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