文件名称:rbac:移动了https
文件大小:5KB
文件格式:ZIP
更新时间:2024-05-30 17:45:08
Go
拉巴克 Rbac是的rbac中间件,它基于 。 安装 go get github.com/tango-contrib/rbac 简单的例子 package main import ( "github.com/lunny/tango" "github.com/mikespook/gorbac" "github.com/tango-contrib/rbac" "github.com/tango-contrib/session" ) type LoginAction struct { session. Session rbac. Manager } func ( l * LoginAction ) Post () { l . SetRBACRole ( "writer" ) } type RBACPermAction struct { rbac. Perm `write` }
【文件预览】:
rbac-master
----circle.yml(212B)
----rbac_test.go(12KB)
----rbac.go(5KB)
----LICENSE(1KB)
----README.md(2KB)