middleware

package
v0.0.0-...-a8bd786 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RequestIDHeader                   = "X-Request-Id"
	RequestAuthCtx  ctxKeyRequestAuth = 0
)

Variables

This section is empty.

Functions

func CheckCasbinPermission

func CheckCasbinPermission(casbin *casbin.Enforcer, cfg config.Config) gin.HandlerFunc

Types

type JwtRoleAuth

type JwtRoleAuth struct {
	// contains filtered or unexported fields
}

func (*JwtRoleAuth) CheckPermission

func (casb *JwtRoleAuth) CheckPermission(c *gin.Context) (bool, error)

func (*JwtRoleAuth) GetRole

func (casb *JwtRoleAuth) GetRole(c *gin.Context) (string, int)

Jump to

Keyboard shortcuts

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