middleware

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 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 *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.

Jump to

Keyboard shortcuts

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