Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccessLogger ¶
func AccessLogger(logger *zap.SugaredLogger, logEventFunc com.LogEventFunc, record bool) gin.HandlerFunc
AccessLogger 是一个中间件,用于记录 HTTP 访问日志。 AccessLogger is a middleware for recording HTTP access logs.
func BodyBuffer ¶
func BodyBuffer() gin.HandlerFunc
BodyBuffer 是一个中间件,用于缓冲请求和响应的主体。 BodyBuffer is a middleware that buffers the request and response bodies.
func Cors ¶
func Cors() gin.HandlerFunc
Cors 是一个中间件,用于向响应中添加 CORS 头。 Cors is a middleware that adds CORS headers to the response.
func Recovery ¶
func Recovery(logger *zap.SugaredLogger, logEventFunc com.LogEventFunc) gin.HandlerFunc
Recovery 是一个中间件,用于捕获和处理 panic。 Recovery is a middleware for capturing and handling panic.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.