middleware

package
v0.0.0-...-9d48049 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContentTypeJSON

func ContentTypeJSON(next httprouter.Handle) httprouter.Handle

ContentTypeJSON for the HTTP response.

Types

type Chain

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

Chain represents helper struct that is able to wrap httprouter.Handle with chain.

func NewChain

func NewChain(middlewares ...HandleFunc) Chain

NewChain create a chain out of middlewares.

func (Chain) Wrap

func (chain Chain) Wrap(handler httprouter.Handle) httprouter.Handle

Wrap the handler with Chain.

type HandleFunc

type HandleFunc func(httprouter.Handle) httprouter.Handle

HandleFunc is a method type that represents Middleware HandleFunc function.

Jump to

Keyboard shortcuts

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