middleware

package
v1.8.7 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 JwtMiddleware

func JwtMiddleware(c *fiber.Ctx) error

func OperaterLog

func OperaterLog(ctx *fiber.Ctx) error

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