middlewares

package
v0.0.3-0...-16756a2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCorrelationMw

func NewCorrelationMw(headerName string) mux.MiddlewareFunc

func NewCorsMw

func NewCorsMw(opts cors.Options) mux.MiddlewareFunc

func NewLoggingMw

func NewLoggingMw(reqLogging bool) mux.MiddlewareFunc

Called once

func NewRecoveryMw

func NewRecoveryMw() mux.MiddlewareFunc

Types

type CorrelationMw

type CorrelationMw struct {
	// contains filtered or unexported fields
}

func NewCorrelation

func NewCorrelation(headerName string, next http.Handler) *CorrelationMw

func (*CorrelationMw) ServeHTTP

func (mw *CorrelationMw) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type CorsMw

type CorsMw struct {
	// contains filtered or unexported fields
}

func NewCors

func NewCors(opts cors.Options, next http.Handler) *CorsMw

Called once for each middleware chain

func (*CorsMw) ServeHTTP

func (mw *CorsMw) ServeHTTP(rw http.ResponseWriter, r *http.Request)

This should be the first Middleware in the chain

type LoggingMw

type LoggingMw struct {
	// contains filtered or unexported fields
}

func NewLogging

func NewLogging(reqLogging bool, next http.Handler) *LoggingMw

Called by the router for each request

func (*LoggingMw) ServeHTTP

func (mw *LoggingMw) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type RecoveryMw

type RecoveryMw struct {
	// contains filtered or unexported fields
}

func NewRecovery

func NewRecovery(next http.Handler) *RecoveryMw

func (*RecoveryMw) ServeHTTP

func (mw *RecoveryMw) ServeHTTP(rw http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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