middleware

package
v0.0.0-...-3518e9e Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggingHandler

func LoggingHandler(next http.HandlerFunc) http.HandlerFunc

func ReMuxParams

func ReMuxParams(r *http.Request) map[string]string

Types

type Generator

type Generator func(http.HandlerFunc) http.HandlerFunc

type GeneratorChain

type GeneratorChain []Generator

func Chain

func Chain(generators ...Generator) GeneratorChain

func ExtendedChain

func ExtendedChain(base GeneratorChain, generators ...Generator) GeneratorChain

func (GeneratorChain) Apply

func (g GeneratorChain) Apply(handler http.HandlerFunc) http.HandlerFunc

type HandlerInfo

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

func (*HandlerInfo) Methods

func (hi *HandlerInfo) Methods(methods ...string) *HandlerInfo

func (*HandlerInfo) Name

func (hi *HandlerInfo) Name(name string) *HandlerInfo

func (*HandlerInfo) Values

func (hi *HandlerInfo) Values(pairs ...KeyValPair) *HandlerInfo

type KeyValPair

type KeyValPair struct {
	Key interface{}
	Val interface{}
}

type ReMux

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

func NewReMux

func NewReMux() *ReMux

func (*ReMux) HandleFunc

func (r *ReMux) HandleFunc(path string, handler http.HandlerFunc) *HandlerInfo

func (*ReMux) Reverse

func (r *ReMux) Reverse(name string, params map[string]string) (string, error)

func (*ReMux) ServeHTTP

func (r *ReMux) ServeHTTP(writer http.ResponseWriter, request *http.Request)

type ReMuxMethodsKey

type ReMuxMethodsKey struct{}

type ReMuxParamsKey

type ReMuxParamsKey struct{}

Jump to

Keyboard shortcuts

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