middleware

package
v0.0.0-...-bfdf4f8 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BasicSecurityHeaderMiddleware = NewBasicSecurityHeadersMiddleware()

Functions

This section is empty.

Types

type CacheControlWrapperMiddleware

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

func (*CacheControlWrapperMiddleware) Intercept

func (*CacheControlWrapperMiddleware) Name

type Middleware

type Middleware interface {
	Intercept(h http.Handler) http.Handler
	Name() string
}

func NewBasicSecurityHeadersMiddleware

func NewBasicSecurityHeadersMiddleware() Middleware

func NewCacheControlWrapperMiddleware

func NewCacheControlWrapperMiddleware(maxAge time.Duration) Middleware

func NewSamplePrometheusMetricsMiddleware

func NewSamplePrometheusMetricsMiddleware(maxAge time.Duration) Middleware

type MiddlewareManager

type MiddlewareManager interface {
	SetNewMiddleware(route *mux.Route, middleware []Middleware) error
	RemoveMiddleware(route *mux.Route) error
}

func NewMiddlewareManager

func NewMiddlewareManager(endpointHandlerMapPtr *map[string]http.HandlerFunc) MiddlewareManager

NewMiddlewareManager sets up a new middleware manager singleton instance

type SamplePrometheusMetricsMiddleware

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

func (*SamplePrometheusMetricsMiddleware) Intercept

func (*SamplePrometheusMetricsMiddleware) Name

Jump to

Keyboard shortcuts

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