middleware

package
v0.0.0-...-9337120 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

中间件层

中间件层

Index

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 AnalysisCache

func AnalysisCache(ctx *fiber.Ctx) error

防止狂点设置3秒的缓存

func FilterAppid

func FilterAppid(ctx *fiber.Ctx) error

func JwtMiddleware

func JwtMiddleware(c *fiber.Ctx) error

func OperaterLog

func OperaterLog(ctx *fiber.Ctx) error

fiber 没有将fasthttp的

func Rbac

func Rbac(ctx *fiber.Ctx) error

func Timer

func Timer(ctx *fiber.Ctx) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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