ginplugin

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const RequestBodyKey = "RequestBodyKey"

RequestBodyKey 用于日志输出请求体,避免二次解包 调用时可以在请求Handler里解析完参数后再defer SetRequestBody即可

Variables

This section is empty.

Functions

func GinLogger

func GinLogger() gin.HandlerFunc

GinLogger 日志

func GinRequestIDForTrace

func GinRequestIDForTrace() gin.HandlerFunc

GinRequestIDForTrace gin middleware for request id

func SetRequestBody

func SetRequestBody(c *gin.Context, body []byte)

Types

type CustomResponseWriter

type CustomResponseWriter struct {
	gin.ResponseWriter
	// contains filtered or unexported fields
}

CustomResponseWriter 自定义的 ResponseWriter

func (*CustomResponseWriter) Write

func (c *CustomResponseWriter) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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