Documentation
¶
Index ¶
- Constants
- func AuthMiddleware(tokenMaker token.Maker) gin.HandlerFunc
- func CheckRole() gin.HandlerFunc
- func InitMiddleware(r *gin.Engine)
- func Logger() gin.HandlerFunc
- func NoCache(c *gin.Context)
- func Options(c *gin.Context)
- func RequestId() gin.HandlerFunc
- func Secure(c *gin.Context)
- func Sender() gin.HandlerFunc
Constants ¶
View Source
const ( Authorization = "Authorization" RequestIdKey = "X-Request-Id" )
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶
func AuthMiddleware(tokenMaker token.Maker) gin.HandlerFunc
AuthMiddleware creates a gin middleware for authorization
func CheckRole ¶
func CheckRole() gin.HandlerFunc
func InitMiddleware ¶
func Logger ¶
func Logger() gin.HandlerFunc
func NoCache ¶
NoCache is a middleware function that appends headers to prevent the client from caching the HTTP response.
func Options ¶
Options is a middleware function that appends headers for options requests and aborts then exits the middleware chain and ends the request.
func RequestId ¶
func RequestId() gin.HandlerFunc
func Sender ¶
func Sender() gin.HandlerFunc
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.