middleware

package
v0.0.0-...-7f41b1e Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0, MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppMainRes

func AppMainRes(c *gin.Context) string

func AppVersion

func AppVersion(c *gin.Context) string

AppVersion

usage
middleware.AppVersion(c)
return now api app version

func LoggerContentMiddleware

func LoggerContentMiddleware() gin.HandlerFunc

LoggerContentMiddleware

logger content middleware
this middleware will log request and response content, and copy request body to gin.Context

func LoggerMiddleware

func LoggerMiddleware() gin.HandlerFunc

LoggerMiddleware just use logger to record ip will try X-Forwarded-For, X-Real-Ip filter at status code less than 400 use Warn less than 500 use Error other use Warning use as

g.Use(middleware.LoggerMiddleware())

func LoggerToMQ

func LoggerToMQ() gin.HandlerFunc

LoggerToMQ logger to MQ

func LoggerToMongo

func LoggerToMongo() gin.HandlerFunc

LoggerToMongo logger to mongo

func Usage

func Usage(g *gin.Engine, mw ...gin.HandlerFunc) *gin.Engine

Types

This section is empty.

Jump to

Keyboard shortcuts

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