Documentation ¶
Overview ¶
中间件层
中间件层
Index ¶
- Constants
- Variables
- func AnalysisCache(ctx *fiber.Ctx) error
- func Cors(handle fasthttp.RequestHandler) fasthttp.RequestHandler
- func FTimer(handle fasthttp.RequestHandler) fasthttp.RequestHandler
- func FilterAppid(ctx *fiber.Ctx) error
- func JwtMiddleware(c *fiber.Ctx) error
- func OperaterLog(ctx *fiber.Ctx) error
- func Rbac(ctx *fiber.Ctx) error
- func Timer(ctx *fiber.Ctx) error
- func WechatSpider(handle fasthttp.RequestHandler) fasthttp.RequestHandler
Constants ¶
View Source
const ( INVALID_PARAMS int = 40001 ERROR_AUTH_CHECK_TOKEN_FAIL int = 40002 ERROR_AUTH_CHECK_TOKEN_TIMEOUT int = 40003 ERROR_RBAC_LOAD int = 40004 ERROR_RBAC_AUTH int = 40005 )
内置异常
View Source
const ADMIN_ROLE = 1
Variables ¶
View Source
var TOKEN_ERROR = map[int]string{ INVALID_PARAMS: "Token不能为空", ERROR_AUTH_CHECK_TOKEN_FAIL: "Token鉴权失败", ERROR_AUTH_CHECK_TOKEN_TIMEOUT: "Token已超时", ERROR_RBAC_LOAD: "读取rdbc权限列表失败", ERROR_RBAC_AUTH: "您没有该资源的访问权限", }
内置异常表 TOKEN_ERROR
Functions ¶
func Cors ¶
func Cors(handle fasthttp.RequestHandler) fasthttp.RequestHandler
func FTimer ¶
func FTimer(handle fasthttp.RequestHandler) fasthttp.RequestHandler
func FilterAppid ¶
func FilterAppid(ctx *fiber.Ctx) error
func JwtMiddleware ¶
func WechatSpider ¶
func WechatSpider(handle fasthttp.RequestHandler) fasthttp.RequestHandler
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.