Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Errors ¶
func Errors() framework.Middleware
Errors handles errors coming out of the call stack. It detects safe application errors (aka SafeError) that are used to respond to the requester in a normalized way. Unexpected errors (status >= 500) are logged.
func Logger ¶
func Logger() framework.Middleware
Logger logs request info before and after a handler runs. logs to to stdout in the following format: Before:
TraceID : (StatusCode) HTTPMethod Path -> IPAddr (latency) e.g. 12345 : (200) GET /users/1 -> 192.168.1.0 (4ms)
After:
TODO: add after format TODO: add after example
TODO: make logging output configurable
func Metrics ¶
func Metrics() framework.Middleware
func Panics ¶
func Panics() framework.Middleware
Panics recovers from panics and converts the panic into an error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.