Versions in this module Expand all Collapse all v2 v2.0.2 Jul 17, 2020 Changes in this version + const DefaultAddress + const NoPrintStackBodyString + var LoggerDefaultDateFormat = time.RFC3339 + var LoggerDefaultFormat = "{{.StartTime}} | {{.Status}} | \t {{.Duration}} | {{.Hostname}} | {{.Method}} {{.Path}}" + type ALogger interface + Printf func(format string, v ...interface{}) + Println func(v ...interface{}) + type HTMLPanicFormatter struct + func (t *HTMLPanicFormatter) FormatPanicError(rw http.ResponseWriter, r *http.Request, infos *PanicInformation) + type Handler interface + ServeHTTP func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) + func Wrap(handler http.Handler) Handler + func WrapFunc(handlerFunc http.HandlerFunc) Handler + type HandlerFunc func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) + func (h HandlerFunc) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) + type Logger struct + func NewLogger() *Logger + func (l *Logger) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) + func (l *Logger) SetDateFormat(format string) + func (l *Logger) SetFormat(format string) + type LoggerEntry struct + Duration time.Duration + Hostname string + Method string + Path string + Request *http.Request + StartTime string + Status int + type Negroni struct + func Classic() *Negroni + func New(handlers ...Handler) *Negroni + func (n *Negroni) Handlers() []Handler + func (n *Negroni) Run(addr ...string) + func (n *Negroni) ServeHTTP(rw http.ResponseWriter, r *http.Request) + func (n *Negroni) Use(handler Handler) + func (n *Negroni) UseFunc(...) + func (n *Negroni) UseHandler(handler http.Handler) + func (n *Negroni) UseHandlerFunc(handlerFunc func(rw http.ResponseWriter, r *http.Request)) + func (n *Negroni) With(handlers ...Handler) *Negroni + type PanicFormatter interface + FormatPanicError func(rw http.ResponseWriter, r *http.Request, infos *PanicInformation) + type PanicInformation struct + RecoveredPanic interface{} + Request *http.Request + Stack []byte + func (p *PanicInformation) RequestDescription() string + func (p *PanicInformation) StackAsString() string + type Recovery struct + ErrorHandlerFunc func(interface{}) + Formatter PanicFormatter + LogStack bool + Logger ALogger + PanicHandlerFunc func(*PanicInformation) + PrintStack bool + StackAll bool + StackSize int + func NewRecovery() *Recovery + func (rec *Recovery) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) + type ResponseWriter interface + Before func(func(ResponseWriter)) + Size func() int + Status func() int + Written func() bool + func NewResponseWriter(rw http.ResponseWriter) ResponseWriter + type Static struct + Dir http.FileSystem + IndexFile string + Prefix string + func NewStatic(directory http.FileSystem) *Static + func (s *Static) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) + type TextPanicFormatter struct + func (t *TextPanicFormatter) FormatPanicError(rw http.ResponseWriter, r *http.Request, infos *PanicInformation) Other modules containing this package github.com/urfave/negroni github.com/urfave/negroni/v3