Documentation ¶
Index ¶
- func CORSMiddleware() iris.HandlerFunc
- func CasbinMiddleware(enforcer *casbin.Enforcer, skipper ...SkipperFunc) iris.HandlerFunc
- func JoinRouter(method, path string) string
- func LoggerMiddleware(skipper ...SkipperFunc) iris.HandlerFunc
- func NoMethodHandler() iris.HandlerFunc
- func NoRouteHandler() iris.HandlerFunc
- func RateLimiterMiddleware(skipper ...SkipperFunc) iris.HandlerFunc
- func RecoveryMiddleware() iris.HandlerFunc
- func TraceMiddleware(skipper ...SkipperFunc) iris.HandlerFunc
- func UserAuthMiddleware(a auth.Auther, skipper ...SkipperFunc) iris.HandlerFunc
- func WWWMiddleware(root string, skipper ...SkipperFunc) iris.HandlerFunc
- type SkipperFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CasbinMiddleware ¶
func CasbinMiddleware(enforcer *casbin.Enforcer, skipper ...SkipperFunc) iris.HandlerFunc
CasbinMiddleware casbin中间件
func LoggerMiddleware ¶
func LoggerMiddleware(skipper ...SkipperFunc) iris.HandlerFunc
LoggerMiddleware 日志中间件
func RateLimiterMiddleware ¶
func RateLimiterMiddleware(skipper ...SkipperFunc) iris.HandlerFunc
RateLimiterMiddleware 请求频率限制中间件
func TraceMiddleware ¶
func TraceMiddleware(skipper ...SkipperFunc) iris.HandlerFunc
TraceMiddleware 跟踪ID中间件
func UserAuthMiddleware ¶
func UserAuthMiddleware(a auth.Auther, skipper ...SkipperFunc) iris.HandlerFunc
UserAuthMiddleware 用户授权中间件
func WWWMiddleware ¶
func WWWMiddleware(root string, skipper ...SkipperFunc) iris.HandlerFunc
WWWMiddleware 静态站点中间件
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.