Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggerHandler ¶
func LoggerHandler() gin.HandlerFunc
LoggerHandler record log
Example ¶
router.Use(LoggerHandler())
Output:
func RecoverHandler ¶
func RecoverHandler() gin.HandlerFunc
RecoverHandler recover from panic
Example ¶
router.Use(RecoverHandler())
Output:
Types ¶
type HttpMetaData ¶
const ( HTTPStatusCode HttpMetaData = "statusCode" HTTPContentType HttpMetaData = "contentType" HTTPMethod HttpMetaData = "httpMethod" HTTPPath HttpMetaData = "httpPath" HTTPQuery HttpMetaData = "httpQuery" HTTPClientIp HttpMetaData = "httpClientIp" HTTPUserAgent HttpMetaData = "httpUserAgent" )
Click to show internal directories.
Click to hide internal directories.