Documentation ¶
Index ¶
- Constants
- Variables
- type Backend
- type BackendFactory
- type CasbinBackend
- func (cb *CasbinBackend) AddObjectToGroup(grp *storage.Group, obj *storage.Entity) error
- func (cb *CasbinBackend) AddRoleToEntity(ent *storage.Entity, rol *storage.Role) error
- func (cb *CasbinBackend) AddRoleToGroup(grp *storage.Group, rol *storage.Role) error
- func (cb *CasbinBackend) AddSubjectToGroup(grp *storage.Group, sub *storage.Entity) error
- func (cb *CasbinBackend) CreateGroup(grp *storage.Group) error
- func (cb *CasbinBackend) DeleteGroup(grp *storage.Group) error
- func (cb *CasbinBackend) Enforce(sub, obj *storage.Entity, act *storage.Action) error
- func (cb *CasbinBackend) RemoveObjectFromGroup(grp *storage.Group, obj *storage.Entity) error
- func (cb *CasbinBackend) RemoveRoleFromEntity(ent *storage.Entity, rol *storage.Role) error
- func (cb *CasbinBackend) RemoveRoleFromGroup(grp *storage.Group, rol *storage.Role) error
- func (cb *CasbinBackend) RemoveSubjectFromGroup(grp *storage.Group, sub *storage.Entity) error
- type CasbinBackendOption
Constants ¶
View Source
const ( CASBIN_BACKEND_DEFAULT_ENFORCER_HANDLER = 0 CASBIN_BACKEND_POLICY_PTYPE = "p" CASBIN_BACKEND_UNGROUPING_PTYPE = "g2" CASBIN_BACKEND_SUBJECT_PTYPE = "g2" CASBIN_BACKEND_OBJECT_PTYPE = "g3" CASBIN_BACKEND_UNGROUPING = "ungrouping" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { Enforce(sub, obj *storage.Entity, act *storage.Action) error CreateGroup(*storage.Group) error DeleteGroup(*storage.Group) error AddSubjectToGroup(*storage.Group, *storage.Entity) error RemoveSubjectFromGroup(*storage.Group, *storage.Entity) error AddObjectToGroup(*storage.Group, *storage.Entity) error RemoveObjectFromGroup(*storage.Group, *storage.Entity) error AddRoleToGroup(*storage.Group, *storage.Role) error RemoveRoleFromGroup(*storage.Group, *storage.Role) error AddRoleToEntity(ent *storage.Entity, rol *storage.Role) error RemoveRoleFromEntity(ent *storage.Entity, rol *storage.Role) error }
func NewBackend ¶
type BackendFactory ¶
type CasbinBackend ¶
type CasbinBackend struct {
// contains filtered or unexported fields
}
func (*CasbinBackend) AddObjectToGroup ¶
func (*CasbinBackend) AddRoleToEntity ¶
func (*CasbinBackend) AddRoleToGroup ¶
func (*CasbinBackend) AddSubjectToGroup ¶
func (*CasbinBackend) CreateGroup ¶
func (cb *CasbinBackend) CreateGroup(grp *storage.Group) error
func (*CasbinBackend) DeleteGroup ¶
func (cb *CasbinBackend) DeleteGroup(grp *storage.Group) error
func (*CasbinBackend) RemoveObjectFromGroup ¶
func (*CasbinBackend) RemoveRoleFromEntity ¶
func (*CasbinBackend) RemoveRoleFromGroup ¶
func (*CasbinBackend) RemoveSubjectFromGroup ¶
type CasbinBackendOption ¶
type CasbinBackendOption struct {
EnforcerHandler int32
}
Click to show internal directories.
Click to hide internal directories.