middleware

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RequestIDHeaderTag = "Request-Id"

RequestIDHeaderTag Tag used in request header to recover the request Id

Functions

func AddToContext

func AddToContext(id string, obj interface{}) gin.HandlerFunc

AddToContext returns a Handler middleware which add an object to the request context

func GinLogrus

func GinLogrus(logger *logrus.Logger) gin.HandlerFunc

GinLogrus returns a Handler middleware which defines Logrus as router logger

func RequestID

func RequestID(contextID string) gin.HandlerFunc

RequestID returns a gin middleware function which assign (or recover) a unique uuid to the request header and to the gin context

Types

This section is empty.

Jump to

Keyboard shortcuts

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