middleware

package
v0.6.29-beta-2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Elapsed

func Elapsed(what string) func()

func EnrichPathParams

func EnrichPathParams(r *http.Request, params map[string]string)

func EnrichRequestBody

func EnrichRequestBody(r *http.Request) error

func EnrichRequestWithMuxRoute added in v0.6.26

func EnrichRequestWithMuxRoute(r *http.Request, route *mux.Route)

func EnrichRule

func EnrichRule(req *http.Request, r *rule.Rule)

func ExtractMiddleware

func ExtractMiddleware(r *http.Request, name string) (rule.MiddlewareSpec, bool)

func ExtractPathParams

func ExtractPathParams(r *http.Request) (map[string]string, bool)

func ExtractRequestBody

func ExtractRequestBody(r *http.Request) (io.ReadCloser, bool)

func ExtractRule

func ExtractRule(r *http.Request) (*rule.Rule, bool)

Types

type Middleware

type Middleware interface {
	Info() *MiddlewareInfo
	ServeHTTP(rw http.ResponseWriter, req *http.Request)
}

type MiddlewareInfo

type MiddlewareInfo struct {
	Name        string
	Description string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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