Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authn ¶
func Authn() gin.HandlerFunc
Authn 是认证中间件,用来从 gin.Context 中提取 token 并验证 token 是否合法, 如果合法则将 token 中的用户名存放在 gin.Context 的 XUsernameKey 键中.
func RequestID ¶
func RequestID() gin.HandlerFunc
给每一个 HTTP 请求的 context, response 中注入 `X-Request-ID` 键值对.
Types ¶
Click to show internal directories.
Click to hide internal directories.