casbin

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// casbin 初始化可能的错误
	ErrorCasbinCanNotUseDbPtr         string = "" /* 138-byte string literal not displayed */
	ErrorCasbinCreateAdaptFail        string = "casbin NewAdapterByDBUseTableName 发生错误:"
	ErrorCasbinCreateEnforcerFail     string = "casbin NewEnforcer 发生错误:"
	ErrorCasbinNewModelFromStringFail string = "NewModelFromString 调用时出错:"
	ErrorsCasbinNoAuthorization       string = "Casbin 鉴权未通过,请在后台检查 casbin 设置参数"
)

Variables

This section is empty.

Functions

func ErrorCasbinAuthFail

func ErrorCasbinAuthFail(c *gin.Context, msg interface{})

casbin 鉴权失败,返回 405 方法不允许访问

func InitCasbinEnforcer

func InitCasbinEnforcer() (*casbin.SyncedEnforcer, error)

创建 casbin Enforcer(执行器)

func Start added in v0.0.14

func Start()

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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