middlewares

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminLogger

func AdminLogger() gin.HandlerFunc

AdminLogger 管理员操作日志 @return gin.HandlerFunc

func CatchError

func CatchError() gin.HandlerFunc

CatchError 异常捕捉 @return gin.HandlerFunc 返回一个中间件上下文

func CheckPermission

func CheckPermission() gin.HandlerFunc

CheckPermission 权限检测 @return gin.HandlerFunc

func Cors

func Cors() gin.HandlerFunc

Cors 直接放行所有跨域请求并放行所有 OPTIONS 方法 @return gin.HandlerFunc

func Jwt

func Jwt(guard string) gin.HandlerFunc

Jwt 鉴权 @return gin.HandlerFunc 返回一个中间件上下文

func VerifyRoute

func VerifyRoute(route string, method string, routes map[string]string) bool

VerifyRoute 判断访问路径是否为白名单,在白名单直接返回true不验证token @param string route 当前请求路由 @param string method 当前请求的http方法 @param map[string]string routes 路由组 @return bool 返回一个路由是否存在不校验token数组路由中的值

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL