Documentation ¶
Index ¶
- func CasbinMiddleware(skipper ...SkipperFunc) gin.HandlerFunc
- func JoinRouter(method, path string) string
- func NoMethodHandler() gin.HandlerFunc
- func NoRouteHandler() gin.HandlerFunc
- func RecoveryMiddleware() gin.HandlerFunc
- func UserAuthMiddleware(skipper ...SkipperFunc) gin.HandlerFunc
- type SkipperFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CasbinMiddleware ¶
func CasbinMiddleware(skipper ...SkipperFunc) gin.HandlerFunc
CasbinMiddleware casbin中间件
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.