middleware

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrUndefinedMiddleware

type ErrUndefinedMiddleware struct {
	ID string
}

ErrUndefinedMiddleware represents lookup against a middleware that has yet to be defined has failed.

func (ErrUndefinedMiddleware) Error

func (e ErrUndefinedMiddleware) Error() string

type Middleware

type Middleware interface {
	Init(map[string]string) error
	Middleware(http.Handler) http.Handler
}

Middleware defines the necessary functions to configure and implement a middleware for use on a route.

func Lookup

func Lookup(id string) Middleware

Lookup takes an id and attempts to return the corresponding middleware if the middleware is undefined nil is returned.

Directories

Path Synopsis
middlewares

Jump to

Keyboard shortcuts

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