Documentation ¶
Index ¶
- Variables
- func AddPolicy(role string, res string, action string) bool
- func CheckEnforce(role string, res string, action string) bool
- func DeletePolicy(role string, res string, action string) bool
- func GetToken(ctx context.Context, token string) model2.User
- func KeyMatchFunc(args ...interface{}) (interface{}, error)
- func SetToken(ctx context.Context, token string, user model2.User) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TokenTimeOut = time.Second * 3600 RDB = config.RDB )
Functions ¶
func KeyMatchFunc ¶
func KeyMatchFunc(args ...interface{}) (interface{}, error)
自定义匹配函数 规则: (r.sub == p.sub && r.obj == p.obj) || (r.sub == p.sub && p.obj == '*')
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.