middleware

package
v0.0.0-...-33f0eed Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Body

func Body(size int64) gin.HandlerFunc

Body reads and partially copies the request body for debugging.

func GetBody

func GetBody(ctx *gin.Context) []byte

GetBody returns a copy of the request body if it's present.

func GetLogger

func GetLogger(ctx *gin.Context) *logging.Logger

GetLogger returns the request logger from the Gin context if it's present.

func GetRequestID

func GetRequestID(ctx *gin.Context) string

GetRequestID returns the request ID associated with the current request.

func Logger

func Logger() gin.HandlerFunc

Logger returns a request logger middleware, which logs the HTTP request and creates a logger instance to be used throughout the execution of the request.

func Recovery

func Recovery() gin.HandlerFunc

Recovery is a middleware that recovers from panic then logs the stack trace.

Types

This section is empty.

Jump to

Keyboard shortcuts

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