middleware

package
v0.0.0-...-c285f8c Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const WeekSeconds = 7 * 86400

Variables

Store session存储

Functions

func CheckPermission

func CheckPermission() gin.HandlerFunc

CheckPermission 判断用户是否已激活,确认对应访问权限

func InitCurrentUserIfExists

func InitCurrentUserIfExists() gin.HandlerFunc

InitCurrentUserIfExists 设置登录用户

func IsFunctionEnabled

func IsFunctionEnabled(functionKey string) gin.HandlerFunc

func RequireAdmin

func RequireAdmin() gin.HandlerFunc

RequireAdmin 判断用户是否是管理员

func RequireAuth

func RequireAuth() gin.HandlerFunc

RequireAuth 需要登录

func Session

func Session(secret string) gin.HandlerFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

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