middleware

package
v0.0.0-...-c103bd4 Latest Latest
Warning

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

Go to latest
Published: May 31, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger() gin.HandlerFunc

Logger instances a log middleware that will write the logs to os.Stdout.

func LoggerWithWriter

func LoggerWithWriter(out io.Writer, notLogged ...string) gin.HandlerFunc

LoggerWithWriter instances a log middleware with the specified writter buffer. Example: os.Stdout, a file opened in write mode, a socket...

func Recovery

func Recovery() gin.HandlerFunc

Recovery returns a middleware that recovers from any panics and writes a 500 to os.Stderr if there was one.

func RecoveryWithWriter

func RecoveryWithWriter(out io.Writer) gin.HandlerFunc

RecoveryWithWriter returns a middleware that recovers from any panics and writes a 500 to the specified io.Writer if there was one.

Example: os.Stdout, a file opened in write mode, a socket...

Types

This section is empty.

Jump to

Keyboard shortcuts

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