filter

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: MIT Imports: 1 Imported by: 20

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter interface {
	// GetHandler decorates one http.HandlerFunc with another
	GetHandler(http.HandlerFunc) http.HandlerFunc
}

Filter is an interface to be implemented by components that can wrapper a new http.HandlerFunc around another.

func NewChain

func NewChain(filters ...Filter) Filter

NewChain returns a Filter that can wrap a succession of http.HandlerFuncs provided by other Filters around another http.HandlerFunc

func NewGenericFilter

func NewGenericFilter(getHandler GetHandlerFn) Filter

NewGenericFilter returns a generic implementation of of the filter.Filter interface where the functionality is specified by a function passed in as an argument

type GetHandlerFn

type GetHandlerFn func(handle http.HandlerFunc) http.HandlerFunc

GetHandlerFn defines functions used to return an HTTP handler that wraps another

Jump to

Keyboard shortcuts

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