middleware

package
v0.0.0-...-f319bbd Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Errors

func Errors(logger *log.Logger) web.Middleware

Errors handles error coming out of the call chain. It detects normal application errors with are used to respond to the client in a uniform way. Unexpected errors or untrusted errors (status >= 500) are logged.

func Logger

func Logger(logger *log.Logger) web.Middleware

Logger writes some information about the request to the logs in the format: TraceID : HTTPMethod Path -> IP ADDR (StatusCode) (latency)

func Panics

func Panics(logger *log.Logger) web.Middleware

Panics recovers from panics and converts the panic to an error so it is reported in Metrics and handled in Errors.

Types

This section is empty.

Jump to

Keyboard shortcuts

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