middleware

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2017 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessLog

type AccessLog struct{}

func NewAccessLog

func NewAccessLog() (*AccessLog, error)

func (*AccessLog) MiddlewareFunc

func (l *AccessLog) MiddlewareFunc(handler rest.HandlerFunc) rest.HandlerFunc

type FieldFunc added in v1.9.0

type FieldFunc func(newFields log.Fields, value string) log.Fields

func NewMD5FieldFunc added in v1.9.0

func NewMD5FieldFunc(key string) FieldFunc

func NewRawFieldFunc added in v1.9.0

func NewRawFieldFunc(key string) FieldFunc
type Header struct {
	HeaderFieldFuncs StringFieldFuncMap
}

func NewHeader added in v1.9.0

func NewHeader() (*Header, error)

func (*Header) AddHeaderFieldFunc added in v1.9.0

func (h *Header) AddHeaderFieldFunc(header string, fieldFunc FieldFunc)

func (*Header) MiddlewareFunc added in v1.9.0

func (h *Header) MiddlewareFunc(handler rest.HandlerFunc) rest.HandlerFunc

type Logger

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

func NewLogger

func NewLogger(logger log.Logger) (*Logger, error)

func (*Logger) MiddlewareFunc

func (l *Logger) MiddlewareFunc(handler rest.HandlerFunc) rest.HandlerFunc

type Recover

type Recover struct{}

func NewRecover

func NewRecover() (*Recover, error)

func (*Recover) MiddlewareFunc

func (r *Recover) MiddlewareFunc(handler rest.HandlerFunc) rest.HandlerFunc

type StringFieldFuncMap added in v1.9.0

type StringFieldFuncMap map[string]FieldFunc

type Trace

type Trace struct{}

func NewTrace

func NewTrace() (*Trace, error)

func (*Trace) MiddlewareFunc

func (l *Trace) MiddlewareFunc(handler rest.HandlerFunc) rest.HandlerFunc

Jump to

Keyboard shortcuts

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