middleware

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: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OperateType = 2
	LoginType   = 1
	LogFail     = "记录日志失败"
)
View Source
const (
	PermissionDenied = "没有权限"
	IsSuperAdmin     = 1
)
View Source
const (
	GuardError = "Guard错误"
)

Variables

View Source
var ExcludeAuth = map[string]string{
	"/admin/index": "GET",
}

ExcludeAuth 校验tokan,但不检查权限的路由

View Source
var ExcludeRoute = map[string]string{
	"/user/login":         "POST",
	"/admin/login":        "POST",
	"/pc/login":           "POST",
	"/pc/send/code":       "POST",
	"/pc/chat/gpt/stream": "GET",
}

ExcludeRoute 以下路由不校验token

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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