Documentation ¶
Index ¶
- Constants
- func GetCliCtx() *gin.Context
- func GetClientIp(ctx *gin.Context) string
- func GetRequestId(ctx *gin.Context) string
- func GetServerIp(ctx *gin.Context) string
- func GinContextFromContext(ctx context.Context) (*gin.Context, error)
- func GinContextToContextMiddleware() gin.HandlerFunc
- func IpMiddleware() gin.HandlerFunc
- func RequestIdMiddleware() gin.HandlerFunc
Constants ¶
View Source
const ( CLIENT_IP = "client_ip" SERVER_IP = "server_ip" )
View Source
const (
GIN_CONTEXT_KEY = "GinContextKey"
)
View Source
const (
REQUEST_ID = "X-Request-Id"
)
View Source
const (
TAG_NAME = "middleware"
)
Variables ¶
This section is empty.
Functions ¶
func GetClientIp ¶
func GetServerIp ¶
func GinContextToContextMiddleware ¶
func GinContextToContextMiddleware() gin.HandlerFunc
func IpMiddleware ¶
func IpMiddleware() gin.HandlerFunc
func RequestIdMiddleware ¶
func RequestIdMiddleware() gin.HandlerFunc
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.