Documentation ¶
Index ¶
- func CORSMiddleware() gin.HandlerFunc
- func CasbinMiddleware(skipper ...SkipperFunc) gin.HandlerFunc
- func CookieData()
- func Cors() gin.HandlerFunc
- func Cors2() gin.HandlerFunc
- func ErrorLogHandler() gin.HandlerFunc
- func JoinRouter(method, path string) string
- func NewCookie()
- func NewSession(c *gin.Context, userData map[string]interface{}) error
- func NoCache(c *gin.Context)
- func NoMethodHandler() gin.HandlerFunc
- func NoRouteHandler() gin.HandlerFunc
- func Options(c *gin.Context)
- func PermissionMiddleware(skipper ...SkipperFunc) gin.HandlerFunc
- func RecoveryMiddleware() gin.HandlerFunc
- func Secure(c *gin.Context)
- func SessionData(c *gin.Context) (map[string]interface{}, error)
- func TokenData(c *gin.Context, headerTag string) (map[string]interface{}, error)
- func UserAuthMiddleware(skipper ...SkipperFunc) gin.HandlerFunc
- type SkipperFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CORSMiddleware ¶
func CORSMiddleware() gin.HandlerFunc
func CasbinMiddleware ¶
func CasbinMiddleware(skipper ...SkipperFunc) gin.HandlerFunc
CasbinMiddleware 权限检查中间件 PermissionMiddleware 权限中间件
func CookieData ¶
func CookieData()
func Cors ¶
func Cors() gin.HandlerFunc
func Cors2 ¶
func Cors2() gin.HandlerFunc
func ErrorLogHandler ¶
func ErrorLogHandler() 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 PermissionMiddleware ¶
func PermissionMiddleware(skipper ...SkipperFunc) gin.HandlerFunc
PermissionMiddleware 权限中间件
func UserAuthMiddleware ¶
func UserAuthMiddleware(skipper ...SkipperFunc) gin.HandlerFunc
UserAuthMiddleware 用户授权中间件
Types ¶
type SkipperFunc ¶
SkipperFunc 定义中间件跳过函数
func AllowMethodAndPathPrefixSkipper ¶
func AllowMethodAndPathPrefixSkipper(prefixes ...string) SkipperFunc
AllowMethodAndPathPrefixSkipper 检查请求方法和路径是否包含指定的前缀,如果包含则跳过
func AllowPathPrefixNoSkipper ¶
func AllowPathPrefixNoSkipper(prefixes ...string) SkipperFunc
AllowPathPrefixNoSkipper 检查请求路径是否包含指定的前缀,如果包含则不跳过
func AllowPathPrefixSkipper ¶
func AllowPathPrefixSkipper(prefixes ...string) SkipperFunc
AllowPathPrefixSkipper 检查请求路径是否包含指定的前缀,如果包含则跳过
Click to show internal directories.
Click to hide internal directories.