middleware

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2015 License: MIT Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuth

type BasicAuth struct {
	Username, Password string
	// contains filtered or unexported fields
}

func (BasicAuth) Wrap

func (b BasicAuth) Wrap(next http.Handler) http.Handler

type Chain

type Chain []Middleware

func (Chain) Wrap

func (mc Chain) Wrap(next http.Handler) http.Handler

type LoggableHTTPRequest

type LoggableHTTPRequest struct {
	Method           string
	URL              *url.URL
	Proto            string
	ProtoMajor       int
	ProtoMinor       int
	Header           http.Header
	Body             io.ReadCloser
	ContentLength    int64
	TransferEncoding []string
	Close            bool
	Host             string
	Form             url.Values
	PostForm         url.Values
	MultipartForm    *multipart.Form
	Trailer          http.Header
	RemoteAddr       string
	RequestURI       string
	TLS              *tls.ConnectionState
}

Golang 1.5 introduces a http.Request.Cancel field, of type <-chan struct{} which the lager library fails to deal with. We introduced loggableHTTPRequest as a way of handling this until such time as lager can deal with it.

Once lager can handle the request directly, remove this struct. #101259402

type Middleware

type Middleware interface {
	Wrap(http.Handler) http.Handler
}

func NewBasicAuth

func NewBasicAuth(username, password string, logger lager.Logger) Middleware

func NewHTTPSEnforcer

func NewHTTPSEnforcer(httpsPort uint) Middleware

func NewLogger

func NewLogger(l lager.Logger) Middleware

func NewPanicRecovery

func NewPanicRecovery(logger lager.Logger) Middleware

Directories

Path Synopsis
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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