middleware

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessLogger

func AccessLogger(logger *logr.Logger, logEventFunc com.LogEventFunc, record bool) gin.HandlerFunc

AccessLogger 函数返回一个用于记录访问日志的 Gin 中间件。 The AccessLogger function returns a Gin middleware that logs access information.

func BodyBuffer

func BodyBuffer() gin.HandlerFunc

BodyBuffer 返回一个 Gin 中间件函数,用于处理请求和响应的缓冲。 BodyBuffer returns a Gin middleware function for handling request and response buffering.

func Cors

func Cors() gin.HandlerFunc

Cors 函数返回一个处理跨域请求的 Gin 中间件。 The Cors function returns a Gin middleware that handles CORS requests.

func Recovery

func Recovery(logger *logr.Logger, logEventFunc com.LogEventFunc) gin.HandlerFunc

Recovery 函数返回一个用于处理 panic 恢复的 Gin 中间件。 The Recovery function returns a Gin middleware that recovers from panics.

Types

This section is empty.

Jump to

Keyboard shortcuts

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