Documentation
¶
Index ¶
- func AddRoleForUser(user string, role ...string) error
- func Check(ctx context.Context, subject, object, action string) bool
- func DeleteAllRolesForUser(user string) error
- func DeleteRole(role string) (bool, error)
- func DeleteRoleForUser(user string, role string) error
- func Enforcer() *casbin.SyncedCachedEnforcer
- func GetActionFromHttpMethod(method string) string
- func GetObjectByTable(resource string) string
- func Init(ctx context.Context, adminUserID string) error
- func PermsForUser(user string) ([]policy.Permission, error)
- func ReloadPolicy() error
- func RolesForUser(user string) ([]string, error)
- func Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRoleForUser ¶
func DeleteAllRolesForUser ¶
func DeleteRole ¶
func DeleteRoleForUser ¶
func Enforcer ¶
func Enforcer() *casbin.SyncedCachedEnforcer
func GetActionFromHttpMethod ¶
func GetObjectByTable ¶
func PermsForUser ¶
func PermsForUser(user string) ([]policy.Permission, error)
func ReloadPolicy ¶
func ReloadPolicy() error
func RolesForUser ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.