middleware

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Function

type Function func(next http.Handler) http.Handler

Function for creating middleware

func (Function) Middleware

func (fn Function) Middleware(next http.Handler) http.Handler

type Middleware

type Middleware interface {
	Middleware(next http.Handler) http.Handler
}

Interface for implementing middleware

func Compose

func Compose(stack ...Middleware) Middleware

Compose a stack of middleware into a single middleware

func MethodOverride added in v0.2.2

func MethodOverride() Middleware

MethodOverride allows HTML <form method="post">'s to dispatch PATCH, PUT and DELETE requests by overriding the request method using a hidden "_method" field in the form body.

type Stack

type Stack []Middleware

Stack of middleware

func (Stack) Middleware

func (stack Stack) Middleware(next http.Handler) http.Handler

Middleware fn

Jump to

Keyboard shortcuts

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