middleware

package
v2.0.0-apha.2+incompat... Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2016 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicAuth

func BasicAuth(fn BasicAuthFunc, options ...*BasicAuthOptions) echo.MiddlewareFunc

BasicAuth returns an HTTP basic authentication middleware.

For valid credentials it calls the next handler. For invalid credentials, it sends "401 - Unauthorized" response.

func Favicon

func Favicon() echo.HandlerFunc

Favicon serves the default favicon - GET /favicon.ico.

func Gzip added in v0.0.13

func Gzip(options ...*GzipOptions) echo.MiddlewareFunc

Gzip returns a middleware which compresses HTTP response using gzip compression scheme.

func Logger

func Logger(options ...*LoggerOptions) echo.MiddlewareFunc

func Recover added in v0.0.13

func Recover(options ...*RecoverOptions) echo.MiddlewareFunc

Recover returns a middleware which recovers from panics anywhere in the chain and handles the control to the centralized HTTPErrorHandler.

func Static

func Static(root string, options ...*StaticOptions) echo.MiddlewareFunc

Types

type BasicAuthFunc

type BasicAuthFunc func(string, string) bool

type BasicAuthOptions

type BasicAuthOptions struct {
}

type GzipOptions

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

type LoggerOptions

type LoggerOptions struct {
}

type RecoverOptions

type RecoverOptions struct {
}

type StaticOptions

type StaticOptions struct {
	Root   string `json:"root"`
	Index  string `json:"index"`
	Browse bool   `json:"browse"`
}

Jump to

Keyboard shortcuts

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