Help us shape the future of Go! Take the 2026 Go Developer Survey

adapters

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecoverMiddleware

func RecoverMiddleware(logger *logrus.Logger) func(h http.Handler) http.Handler

RecoverMiddleware used for recovering from panic, logs the panic to given logger and returns 500

Types

type Adapter

type Adapter func(http.Handler) http.Handler

Adapter is just a wrapper over http handler function

func LoggingMiddleware

func LoggingMiddleware(logger *logrus.Logger) Adapter

LoggingMiddleware logs before and after the response to given logger

Jump to

Keyboard shortcuts

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