middleware

package
v0.0.0-...-0e98184 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: Apache-2.0 Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Admin

func Admin() echo.MiddlewareFunc

func Auth

func Auth() echo.MiddlewareFunc

very simple middleware that checks if we have a user and if not aborts the request

func Error

func Error() echo.MiddlewareFunc

func MGO

func Token

func Token(db *mgo.Database) echo.MiddlewareFunc

if there is an access token provided we need to extract it and lookup the user based on the token should we lookup the user now or make it explicit?

func Validator

func Validator(v *jsval.JSVal) echo.MiddlewareFunc

Types

type Chain

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

func NewChain

func NewChain(constructors ...Constructor) Chain

func (Chain) Append

func (c Chain) Append(constructors ...Constructor) Chain

func (Chain) Extend

func (c Chain) Extend(chain Chain) Chain

func (Chain) Then

func (c Chain) Then(h http.Handler) http.Handler

func (Chain) ThenFunc

func (c Chain) ThenFunc(fn http.HandlerFunc) http.Handler

type Constructor

type Constructor func(http.Handler) http.Handler

Jump to

Keyboard shortcuts

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