chix

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2020 License: MIT Imports: 9 Imported by: 0

README

go-chi e[x]tra

Some extra sugar that I need in basically every project when I use go-chi

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileServer

func FileServer(r *chi.Mux, pattern string, path string)

FileServer conveniently sets up a http.FileServer r to serve static files from a http.FileSystem. @see https://github.com/go-chi/chi/issues/155 @see https://github.com/go-chi/chi/issues/184

func NewZapLogger

func NewZapLogger(logger *zap.Logger) func(next http.Handler) http.Handler

Types

type ZapLogger

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

func (*ZapLogger) NewLogEntry

func (l *ZapLogger) NewLogEntry(r *http.Request) middleware.LogEntry

type ZapLoggerEntry

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

func (*ZapLoggerEntry) Panic

func (e *ZapLoggerEntry) Panic(v interface{}, stack []byte)

func (*ZapLoggerEntry) Write

func (e *ZapLoggerEntry) Write(status, bytes int, header http.Header, elapsed time.Duration, extra interface{})

Jump to

Keyboard shortcuts

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