middleware

package
v2.0.0-beta.1+incompat... Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2016 License: MIT Imports: 17 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 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"`
}

Source Files

  • auth.go
  • compress.go
  • logger.go
  • recover.go
  • static.go

Jump to

Keyboard shortcuts

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