Versions in this module Expand all Collapse all v2 v2.77.4 Nov 2, 2024 v2.77.3 Nov 2, 2024 Changes in this version + func CasbinJsGetPermissionForUser(e IEnforcer, user string) (string, error) + func CasbinJsGetPermissionForUserOld(e IEnforcer, user string) ([]byte, error) + func GetCacheKey(params ...interface{}) (string, bool) + type CacheableParam interface + GetCacheKey func() string + type CachedEnforcer struct + func NewCachedEnforcer(params ...interface{}) (*CachedEnforcer, error) + func (e *CachedEnforcer) EnableCache(enableCache bool) + func (e *CachedEnforcer) Enforce(rvals ...interface{}) (bool, error) + func (e *CachedEnforcer) InvalidateCache() error + func (e *CachedEnforcer) LoadPolicy() error + func (e *CachedEnforcer) RemovePolicies(rules [][]string) (bool, error) + func (e *CachedEnforcer) RemovePolicy(params ...interface{}) (bool, error) + func (e *CachedEnforcer) SetCache(c cache.Cache) + func (e *CachedEnforcer) SetExpireTime(expireTime time.Duration) + type DistributedEnforcer struct + func NewDistributedEnforcer(params ...interface{}) (*DistributedEnforcer, error) + func (d *DistributedEnforcer) AddPoliciesSelf(shouldPersist func() bool, sec string, ptype string, rules [][]string) (affected [][]string, err error) + func (d *DistributedEnforcer) ClearPolicySelf(shouldPersist func() bool) error + func (d *DistributedEnforcer) RemoveFilteredPolicySelf(shouldPersist func() bool, sec string, ptype string, fieldIndex int, ...) (affected [][]string, err error) + func (d *DistributedEnforcer) RemovePoliciesSelf(shouldPersist func() bool, sec string, ptype string, rules [][]string) (affected [][]string, err error) + func (d *DistributedEnforcer) UpdateFilteredPoliciesSelf(shouldPersist func() bool, sec string, ptype string, newRules [][]string, ...) (bool, error) + func (d *DistributedEnforcer) UpdatePoliciesSelf(shouldPersist func() bool, sec string, ptype string, ...) (affected bool, err error) + func (d *DistributedEnforcer) UpdatePolicySelf(shouldPersist func() bool, sec string, ptype string, oldRule, newRule []string) (affected bool, err error) + func (e *DistributedEnforcer) SetDispatcher(dispatcher persist.Dispatcher) + type EnforceContext struct + EType string + MType string + PType string + RType string + func NewEnforceContext(suffix string) EnforceContext + func (e EnforceContext) GetCacheKey() string + type Enforcer struct + func NewEnforcer(params ...interface{}) (*Enforcer, error) + func (e *Enforcer) AddFunction(name string, function govaluate.ExpressionFunction) + func (e *Enforcer) AddGroupingPolicies(rules [][]string) (bool, error) + func (e *Enforcer) AddGroupingPoliciesEx(rules [][]string) (bool, error) + func (e *Enforcer) AddGroupingPolicy(params ...interface{}) (bool, error) + func (e *Enforcer) AddNamedDomainLinkConditionFunc(ptype, user, role string, domain string, fn rbac.LinkConditionFunc) bool + func (e *Enforcer) AddNamedDomainMatchingFunc(ptype, name string, fn rbac.MatchingFunc) bool + func (e *Enforcer) AddNamedGroupingPolicies(ptype string, rules [][]string) (bool, error) + func (e *Enforcer) AddNamedGroupingPoliciesEx(ptype string, rules [][]string) (bool, error) + func (e *Enforcer) AddNamedGroupingPolicy(ptype string, params ...interface{}) (bool, error) + func (e *Enforcer) AddNamedLinkConditionFunc(ptype, user, role string, fn rbac.LinkConditionFunc) bool + func (e *Enforcer) AddNamedMatchingFunc(ptype, name string, fn rbac.MatchingFunc) bool + func (e *Enforcer) AddNamedPolicies(ptype string, rules [][]string) (bool, error) + func (e *Enforcer) AddNamedPoliciesEx(ptype string, rules [][]string) (bool, error) + func (e *Enforcer) AddNamedPolicy(ptype string, params ...interface{}) (bool, error) + func (e *Enforcer) AddPermissionForUser(user string, permission ...string) (bool, error) + func (e *Enforcer) AddPermissionsForUser(user string, permissions ...[]string) (bool, error) + func (e *Enforcer) AddPolicies(rules [][]string) (bool, error) + func (e *Enforcer) AddPoliciesEx(rules [][]string) (bool, error) + func (e *Enforcer) AddPolicy(params ...interface{}) (bool, error) + func (e *Enforcer) AddRoleForUser(user string, role string, domain ...string) (bool, error) + func (e *Enforcer) AddRoleForUserInDomain(user string, role string, domain string) (bool, error) + func (e *Enforcer) AddRolesForUser(user string, roles []string, domain ...string) (bool, error) + func (e *Enforcer) BatchEnforce(requests [][]interface{}) ([]bool, error) + func (e *Enforcer) BatchEnforceWithMatcher(matcher string, requests [][]interface{}) ([]bool, error) + func (e *Enforcer) BuildIncrementalConditionalRoleLinks(op model.PolicyOp, ptype string, rules [][]string) error + func (e *Enforcer) BuildIncrementalRoleLinks(op model.PolicyOp, ptype string, rules [][]string) error + func (e *Enforcer) BuildRoleLinks() error + func (e *Enforcer) ClearPolicy() + func (e *Enforcer) DeleteAllUsersByDomain(domain string) (bool, error) + func (e *Enforcer) DeleteDomains(domains ...string) (bool, error) + func (e *Enforcer) DeletePermission(permission ...string) (bool, error) + func (e *Enforcer) DeletePermissionForUser(user string, permission ...string) (bool, error) + func (e *Enforcer) DeletePermissionsForUser(user string) (bool, error) + func (e *Enforcer) DeleteRole(role string) (bool, error) + func (e *Enforcer) DeleteRoleForUser(user string, role string, domain ...string) (bool, error) + func (e *Enforcer) DeleteRoleForUserInDomain(user string, role string, domain string) (bool, error) + func (e *Enforcer) DeleteRolesForUser(user string, domain ...string) (bool, error) + func (e *Enforcer) DeleteRolesForUserInDomain(user string, domain string) (bool, error) + func (e *Enforcer) DeleteUser(user string) (bool, error) + func (e *Enforcer) EnableAcceptJsonRequest(acceptJsonRequest bool) + func (e *Enforcer) EnableAutoBuildRoleLinks(autoBuildRoleLinks bool) + func (e *Enforcer) EnableAutoNotifyDispatcher(enable bool) + func (e *Enforcer) EnableAutoNotifyWatcher(enable bool) + func (e *Enforcer) EnableAutoSave(autoSave bool) + func (e *Enforcer) EnableEnforce(enable bool) + func (e *Enforcer) EnableLog(enable bool) + func (e *Enforcer) Enforce(rvals ...interface{}) (bool, error) + func (e *Enforcer) EnforceEx(rvals ...interface{}) (bool, []string, error) + func (e *Enforcer) EnforceExWithMatcher(matcher string, rvals ...interface{}) (bool, []string, error) + func (e *Enforcer) EnforceWithMatcher(matcher string, rvals ...interface{}) (bool, error) + func (e *Enforcer) GetAdapter() persist.Adapter + func (e *Enforcer) GetAllActions() []string + func (e *Enforcer) GetAllDomains() ([]string, error) + func (e *Enforcer) GetAllNamedActions(ptype string) []string + func (e *Enforcer) GetAllNamedObjects(ptype string) []string + func (e *Enforcer) GetAllNamedRoles(ptype string) []string + func (e *Enforcer) GetAllNamedSubjects(ptype string) []string + func (e *Enforcer) GetAllObjects() []string + func (e *Enforcer) GetAllRoles() []string + func (e *Enforcer) GetAllRolesByDomain(domain string) []string + func (e *Enforcer) GetAllSubjects() []string + func (e *Enforcer) GetAllUsersByDomain(domain string) []string + func (e *Enforcer) GetAllowedObjectConditions(user string, action string, prefix string) ([]string, error) + func (e *Enforcer) GetDomainsForUser(user string) ([]string, error) + func (e *Enforcer) GetFieldIndex(ptype string, field string) (int, error) + func (e *Enforcer) GetFilteredGroupingPolicy(fieldIndex int, fieldValues ...string) [][]string + func (e *Enforcer) GetFilteredNamedGroupingPolicy(ptype string, fieldIndex int, fieldValues ...string) [][]string + func (e *Enforcer) GetFilteredNamedPolicy(ptype string, fieldIndex int, fieldValues ...string) [][]string + func (e *Enforcer) GetFilteredNamedPolicyWithMatcher(ptype string, matcher string) ([][]string, error) + func (e *Enforcer) GetFilteredPolicy(fieldIndex int, fieldValues ...string) [][]string + func (e *Enforcer) GetGroupingPolicy() [][]string + func (e *Enforcer) GetImplicitPermissionsForUser(user string, domain ...string) ([][]string, error) + func (e *Enforcer) GetImplicitResourcesForUser(user string, domain ...string) ([][]string, error) + func (e *Enforcer) GetImplicitRolesForUser(name string, domain ...string) ([]string, error) + func (e *Enforcer) GetImplicitUsersForPermission(permission ...string) ([]string, error) + func (e *Enforcer) GetImplicitUsersForResource(resource string) ([][]string, error) + func (e *Enforcer) GetImplicitUsersForResourceByDomain(resource string, domain string) ([][]string, error) + func (e *Enforcer) GetImplicitUsersForRole(name string, domain ...string) ([]string, error) + func (e *Enforcer) GetModel() model.Model + func (e *Enforcer) GetNamedGroupingPolicy(ptype string) [][]string + func (e *Enforcer) GetNamedImplicitPermissionsForUser(ptype string, user string, domain ...string) ([][]string, error) + func (e *Enforcer) GetNamedPermissionsForUser(ptype string, user string, domain ...string) [][]string + func (e *Enforcer) GetNamedPolicy(ptype string) [][]string + func (e *Enforcer) GetNamedRoleManager(ptype string) rbac.RoleManager + func (e *Enforcer) GetPermissionsForUser(user string, domain ...string) [][]string + func (e *Enforcer) GetPermissionsForUserInDomain(user string, domain string) [][]string + func (e *Enforcer) GetPolicy() [][]string + func (e *Enforcer) GetRoleManager() rbac.RoleManager + func (e *Enforcer) GetRolesForUser(name string, domain ...string) ([]string, error) + func (e *Enforcer) GetRolesForUserInDomain(name string, domain string) []string + func (e *Enforcer) GetUsersForRole(name string, domain ...string) ([]string, error) + func (e *Enforcer) GetUsersForRoleInDomain(name string, domain string) []string + func (e *Enforcer) HasGroupingPolicy(params ...interface{}) bool + func (e *Enforcer) HasNamedGroupingPolicy(ptype string, params ...interface{}) bool + func (e *Enforcer) HasNamedPolicy(ptype string, params ...interface{}) bool + func (e *Enforcer) HasPermissionForUser(user string, permission ...string) bool + func (e *Enforcer) HasPolicy(params ...interface{}) bool + func (e *Enforcer) HasRoleForUser(name string, role string, domain ...string) (bool, error) + func (e *Enforcer) InitWithAdapter(modelPath string, adapter persist.Adapter) error + func (e *Enforcer) InitWithFile(modelPath string, policyPath string) error + func (e *Enforcer) InitWithModelAndAdapter(m model.Model, adapter persist.Adapter) error + func (e *Enforcer) IsFiltered() bool + func (e *Enforcer) IsLogEnabled() bool + func (e *Enforcer) LoadFilteredPolicy(filter interface{}) error + func (e *Enforcer) LoadIncrementalFilteredPolicy(filter interface{}) error + func (e *Enforcer) LoadModel() error + func (e *Enforcer) LoadPolicy() error + func (e *Enforcer) RemoveFilteredGroupingPolicy(fieldIndex int, fieldValues ...string) (bool, error) + func (e *Enforcer) RemoveFilteredNamedGroupingPolicy(ptype string, fieldIndex int, fieldValues ...string) (bool, error) + func (e *Enforcer) RemoveFilteredNamedPolicy(ptype string, fieldIndex int, fieldValues ...string) (bool, error) + func (e *Enforcer) RemoveFilteredPolicy(fieldIndex int, fieldValues ...string) (bool, error) + func (e *Enforcer) RemoveGroupingPolicies(rules [][]string) (bool, error) + func (e *Enforcer) RemoveGroupingPolicy(params ...interface{}) (bool, error) + func (e *Enforcer) RemoveNamedGroupingPolicies(ptype string, rules [][]string) (bool, error) + func (e *Enforcer) RemoveNamedGroupingPolicy(ptype string, params ...interface{}) (bool, error) + func (e *Enforcer) RemoveNamedPolicies(ptype string, rules [][]string) (bool, error) + func (e *Enforcer) RemoveNamedPolicy(ptype string, params ...interface{}) (bool, error) + func (e *Enforcer) RemovePolicies(rules [][]string) (bool, error) + func (e *Enforcer) RemovePolicy(params ...interface{}) (bool, error) + func (e *Enforcer) SavePolicy() error + func (e *Enforcer) SelfAddPolicies(sec string, ptype string, rules [][]string) (bool, error) + func (e *Enforcer) SelfAddPoliciesEx(sec string, ptype string, rules [][]string) (bool, error) + func (e *Enforcer) SelfAddPolicy(sec string, ptype string, rule []string) (bool, error) + func (e *Enforcer) SelfRemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) (bool, error) + func (e *Enforcer) SelfRemovePolicies(sec string, ptype string, rules [][]string) (bool, error) + func (e *Enforcer) SelfRemovePolicy(sec string, ptype string, rule []string) (bool, error) + func (e *Enforcer) SelfUpdatePolicies(sec string, ptype string, oldRules, newRules [][]string) (bool, error) + func (e *Enforcer) SelfUpdatePolicy(sec string, ptype string, oldRule, newRule []string) (bool, error) + func (e *Enforcer) SetAdapter(adapter persist.Adapter) + func (e *Enforcer) SetEffector(eft effector.Effector) + func (e *Enforcer) SetFieldIndex(ptype string, field string, index int) + func (e *Enforcer) SetLogger(logger log.Logger) + func (e *Enforcer) SetModel(m model.Model) + func (e *Enforcer) SetNamedDomainLinkConditionFuncParams(ptype, user, role, domain string, params ...string) bool + func (e *Enforcer) SetNamedLinkConditionFuncParams(ptype, user, role string, params ...string) bool + func (e *Enforcer) SetNamedRoleManager(ptype string, rm rbac.RoleManager) + func (e *Enforcer) SetRoleManager(rm rbac.RoleManager) + func (e *Enforcer) SetWatcher(watcher persist.Watcher) error + func (e *Enforcer) UpdateFilteredNamedPolicies(ptype string, newPolicies [][]string, fieldIndex int, fieldValues ...string) (bool, error) + func (e *Enforcer) UpdateFilteredPolicies(newPolicies [][]string, fieldIndex int, fieldValues ...string) (bool, error) + func (e *Enforcer) UpdateGroupingPolicies(oldRules [][]string, newRules [][]string) (bool, error) + func (e *Enforcer) UpdateGroupingPolicy(oldRule []string, newRule []string) (bool, error) + func (e *Enforcer) UpdateNamedGroupingPolicies(ptype string, oldRules [][]string, newRules [][]string) (bool, error) + func (e *Enforcer) UpdateNamedGroupingPolicy(ptype string, oldRule []string, newRule []string) (bool, error) + func (e *Enforcer) UpdateNamedPolicies(ptype string, p1 [][]string, p2 [][]string) (bool, error) + func (e *Enforcer) UpdateNamedPolicy(ptype string, p1 []string, p2 []string) (bool, error) + func (e *Enforcer) UpdatePolicies(oldPolices [][]string, newPolicies [][]string) (bool, error) + func (e *Enforcer) UpdatePolicy(oldPolicy []string, newPolicy []string) (bool, error) + type IDistributedEnforcer interface + AddPoliciesSelf func(shouldPersist func() bool, sec string, ptype string, rules [][]string) (affected [][]string, err error) + ClearPolicySelf func(shouldPersist func() bool) error + RemoveFilteredPolicySelf func(shouldPersist func() bool, sec string, ptype string, fieldIndex int, ...) (affected [][]string, err error) + RemovePoliciesSelf func(shouldPersist func() bool, sec string, ptype string, rules [][]string) (affected [][]string, err error) + SetDispatcher func(dispatcher persist.Dispatcher) + UpdateFilteredPoliciesSelf func(shouldPersist func() bool, sec string, ptype string, newRules [][]string, ...) (bool, error) + UpdatePoliciesSelf func(shouldPersist func() bool, sec string, ptype string, ...) (affected bool, err error) + UpdatePolicySelf func(shouldPersist func() bool, sec string, ptype string, oldRule, newRule []string) (affected bool, err error) + type IEnforcer interface + AddFunction func(name string, function govaluate.ExpressionFunction) + AddGroupingPolicies func(rules [][]string) (bool, error) + AddGroupingPoliciesEx func(rules [][]string) (bool, error) + AddGroupingPolicy func(params ...interface{}) (bool, error) + AddNamedGroupingPolicies func(ptype string, rules [][]string) (bool, error) + AddNamedGroupingPoliciesEx func(ptype string, rules [][]string) (bool, error) + AddNamedGroupingPolicy func(ptype string, params ...interface{}) (bool, error) + AddNamedPolicies func(ptype string, rules [][]string) (bool, error) + AddNamedPoliciesEx func(ptype string, rules [][]string) (bool, error) + AddNamedPolicy func(ptype string, params ...interface{}) (bool, error) + AddPermissionForUser func(user string, permission ...string) (bool, error) + AddPermissionsForUser func(user string, permissions ...[]string) (bool, error) + AddPolicies func(rules [][]string) (bool, error) + AddPoliciesEx func(rules [][]string) (bool, error) + AddPolicy func(params ...interface{}) (bool, error) + AddRoleForUser func(user string, role string, domain ...string) (bool, error) + AddRoleForUserInDomain func(user string, role string, domain string) (bool, error) + BatchEnforce func(requests [][]interface{}) ([]bool, error) + BatchEnforceWithMatcher func(matcher string, requests [][]interface{}) ([]bool, error) + BuildRoleLinks func() error + ClearPolicy func() + DeletePermission func(permission ...string) (bool, error) + DeletePermissionForUser func(user string, permission ...string) (bool, error) + DeletePermissionsForUser func(user string) (bool, error) + DeleteRole func(role string) (bool, error) + DeleteRoleForUser func(user string, role string, domain ...string) (bool, error) + DeleteRoleForUserInDomain func(user string, role string, domain string) (bool, error) + DeleteRolesForUser func(user string, domain ...string) (bool, error) + DeleteUser func(user string) (bool, error) + EnableAutoBuildRoleLinks func(autoBuildRoleLinks bool) + EnableAutoNotifyWatcher func(enable bool) + EnableAutoSave func(autoSave bool) + EnableEnforce func(enable bool) + EnableLog func(enable bool) + Enforce func(rvals ...interface{}) (bool, error) + EnforceEx func(rvals ...interface{}) (bool, []string, error) + EnforceExWithMatcher func(matcher string, rvals ...interface{}) (bool, []string, error) + EnforceWithMatcher func(matcher string, rvals ...interface{}) (bool, error) + GetAdapter func() persist.Adapter + GetAllActions func() []string + GetAllNamedActions func(ptype string) []string + GetAllNamedObjects func(ptype string) []string + GetAllNamedRoles func(ptype string) []string + GetAllNamedSubjects func(ptype string) []string + GetAllObjects func() []string + GetAllRoles func() []string + GetAllSubjects func() []string + GetFilteredGroupingPolicy func(fieldIndex int, fieldValues ...string) [][]string + GetFilteredNamedGroupingPolicy func(ptype string, fieldIndex int, fieldValues ...string) [][]string + GetFilteredNamedPolicy func(ptype string, fieldIndex int, fieldValues ...string) [][]string + GetFilteredPolicy func(fieldIndex int, fieldValues ...string) [][]string + GetGroupingPolicy func() [][]string + GetImplicitPermissionsForUser func(user string, domain ...string) ([][]string, error) + GetImplicitRolesForUser func(name string, domain ...string) ([]string, error) + GetImplicitUsersForPermission func(permission ...string) ([]string, error) + GetModel func() model.Model + GetNamedGroupingPolicy func(ptype string) [][]string + GetNamedPolicy func(ptype string) [][]string + GetPermissionsForUser func(user string, domain ...string) [][]string + GetPermissionsForUserInDomain func(user string, domain string) [][]string + GetPolicy func() [][]string + GetRoleManager func() rbac.RoleManager + GetRolesForUser func(name string, domain ...string) ([]string, error) + GetRolesForUserInDomain func(name string, domain string) []string + GetUsersForRole func(name string, domain ...string) ([]string, error) + GetUsersForRoleInDomain func(name string, domain string) []string + HasGroupingPolicy func(params ...interface{}) bool + HasNamedGroupingPolicy func(ptype string, params ...interface{}) bool + HasNamedPolicy func(ptype string, params ...interface{}) bool + HasPermissionForUser func(user string, permission ...string) bool + HasPolicy func(params ...interface{}) bool + HasRoleForUser func(name string, role string, domain ...string) (bool, error) + InitWithAdapter func(modelPath string, adapter persist.Adapter) error + InitWithFile func(modelPath string, policyPath string) error + InitWithModelAndAdapter func(m model.Model, adapter persist.Adapter) error + IsFiltered func() bool + LoadFilteredPolicy func(filter interface{}) error + LoadIncrementalFilteredPolicy func(filter interface{}) error + LoadModel func() error + LoadPolicy func() error + RemoveFilteredGroupingPolicy func(fieldIndex int, fieldValues ...string) (bool, error) + RemoveFilteredNamedGroupingPolicy func(ptype string, fieldIndex int, fieldValues ...string) (bool, error) + RemoveFilteredNamedPolicy func(ptype string, fieldIndex int, fieldValues ...string) (bool, error) + RemoveFilteredPolicy func(fieldIndex int, fieldValues ...string) (bool, error) + RemoveGroupingPolicies func(rules [][]string) (bool, error) + RemoveGroupingPolicy func(params ...interface{}) (bool, error) + RemoveNamedGroupingPolicies func(ptype string, rules [][]string) (bool, error) + RemoveNamedGroupingPolicy func(ptype string, params ...interface{}) (bool, error) + RemoveNamedPolicies func(ptype string, rules [][]string) (bool, error) + RemoveNamedPolicy func(ptype string, params ...interface{}) (bool, error) + RemovePolicies func(rules [][]string) (bool, error) + RemovePolicy func(params ...interface{}) (bool, error) + SavePolicy func() error + SelfAddPolicies func(sec string, ptype string, rules [][]string) (bool, error) + SelfAddPoliciesEx func(sec string, ptype string, rules [][]string) (bool, error) + SelfAddPolicy func(sec string, ptype string, rule []string) (bool, error) + SelfRemoveFilteredPolicy func(sec string, ptype string, fieldIndex int, fieldValues ...string) (bool, error) + SelfRemovePolicies func(sec string, ptype string, rules [][]string) (bool, error) + SelfRemovePolicy func(sec string, ptype string, rule []string) (bool, error) + SelfUpdatePolicies func(sec string, ptype string, oldRules, newRules [][]string) (bool, error) + SelfUpdatePolicy func(sec string, ptype string, oldRule, newRule []string) (bool, error) + SetAdapter func(adapter persist.Adapter) + SetEffector func(eft effector.Effector) + SetModel func(m model.Model) + SetRoleManager func(rm rbac.RoleManager) + SetWatcher func(watcher persist.Watcher) error + UpdateFilteredPolicies func(newPolicies [][]string, fieldIndex int, fieldValues ...string) (bool, error) + UpdateGroupingPolicies func(oldRules [][]string, newRules [][]string) (bool, error) + UpdateGroupingPolicy func(oldRule []string, newRule []string) (bool, error) + UpdateNamedGroupingPolicies func(ptype string, oldRules [][]string, newRules [][]string) (bool, error) + UpdateNamedGroupingPolicy func(ptype string, oldRule []string, newRule []string) (bool, error) + UpdatePolicies func(oldPolicies [][]string, newPolicies [][]string) (bool, error) + UpdatePolicy func(oldPolicy []string, newPolicy []string) (bool, error) + type SyncedCachedEnforcer struct + func NewSyncedCachedEnforcer(params ...interface{}) (*SyncedCachedEnforcer, error) + func (e *SyncedCachedEnforcer) AddPolicies(rules [][]string) (bool, error) + func (e *SyncedCachedEnforcer) AddPolicy(params ...interface{}) (bool, error) + func (e *SyncedCachedEnforcer) EnableCache(enableCache bool) + func (e *SyncedCachedEnforcer) Enforce(rvals ...interface{}) (bool, error) + func (e *SyncedCachedEnforcer) InvalidateCache() error + func (e *SyncedCachedEnforcer) LoadPolicy() error + func (e *SyncedCachedEnforcer) RemovePolicies(rules [][]string) (bool, error) + func (e *SyncedCachedEnforcer) RemovePolicy(params ...interface{}) (bool, error) + func (e *SyncedCachedEnforcer) SetCache(c cache.Cache) + func (e *SyncedCachedEnforcer) SetExpireTime(expireTime time.Duration) + type SyncedEnforcer struct + func NewSyncedEnforcer(params ...interface{}) (*SyncedEnforcer, error) + func (e *SyncedEnforcer) AddFunction(name string, function govaluate.ExpressionFunction) + func (e *SyncedEnforcer) AddGroupingPolicies(rules [][]string) (bool, error) + func (e *SyncedEnforcer) AddGroupingPoliciesEx(rules [][]string) (bool, error) + func (e *SyncedEnforcer) AddGroupingPolicy(params ...interface{}) (bool, error) + func (e *SyncedEnforcer) AddNamedGroupingPolicies(ptype string, rules [][]string) (bool, error) + func (e *SyncedEnforcer) AddNamedGroupingPoliciesEx(ptype string, rules [][]string) (bool, error) + func (e *SyncedEnforcer) AddNamedGroupingPolicy(ptype string, params ...interface{}) (bool, error) + func (e *SyncedEnforcer) AddNamedPolicies(ptype string, rules [][]string) (bool, error) + func (e *SyncedEnforcer) AddNamedPoliciesEx(ptype string, rules [][]string) (bool, error) + func (e *SyncedEnforcer) AddNamedPolicy(ptype string, params ...interface{}) (bool, error) + func (e *SyncedEnforcer) AddPermissionForUser(user string, permission ...string) (bool, error) + func (e *SyncedEnforcer) AddPermissionsForUser(user string, permissions ...[]string) (bool, error) + func (e *SyncedEnforcer) AddPolicies(rules [][]string) (bool, error) + func (e *SyncedEnforcer) AddPoliciesEx(rules [][]string) (bool, error) + func (e *SyncedEnforcer) AddPolicy(params ...interface{}) (bool, error) + func (e *SyncedEnforcer) AddRoleForUser(user string, role string, domain ...string) (bool, error) + func (e *SyncedEnforcer) AddRoleForUserInDomain(user string, role string, domain string) (bool, error) + func (e *SyncedEnforcer) AddRolesForUser(user string, roles []string, domain ...string) (bool, error) + func (e *SyncedEnforcer) BatchEnforce(requests [][]interface{}) ([]bool, error) + func (e *SyncedEnforcer) BatchEnforceWithMatcher(matcher string, requests [][]interface{}) ([]bool, error) + func (e *SyncedEnforcer) BuildRoleLinks() error + func (e *SyncedEnforcer) ClearPolicy() + func (e *SyncedEnforcer) DeletePermission(permission ...string) (bool, error) + func (e *SyncedEnforcer) DeletePermissionForUser(user string, permission ...string) (bool, error) + func (e *SyncedEnforcer) DeletePermissionsForUser(user string) (bool, error) + func (e *SyncedEnforcer) DeleteRole(role string) (bool, error) + func (e *SyncedEnforcer) DeleteRoleForUser(user string, role string, domain ...string) (bool, error) + func (e *SyncedEnforcer) DeleteRoleForUserInDomain(user string, role string, domain string) (bool, error) + func (e *SyncedEnforcer) DeleteRolesForUser(user string, domain ...string) (bool, error) + func (e *SyncedEnforcer) DeleteRolesForUserInDomain(user string, domain string) (bool, error) + func (e *SyncedEnforcer) DeleteUser(user string) (bool, error) + func (e *SyncedEnforcer) Enforce(rvals ...interface{}) (bool, error) + func (e *SyncedEnforcer) EnforceEx(rvals ...interface{}) (bool, []string, error) + func (e *SyncedEnforcer) EnforceExWithMatcher(matcher string, rvals ...interface{}) (bool, []string, error) + func (e *SyncedEnforcer) EnforceWithMatcher(matcher string, rvals ...interface{}) (bool, error) + func (e *SyncedEnforcer) GetAllActions() []string + func (e *SyncedEnforcer) GetAllNamedActions(ptype string) []string + func (e *SyncedEnforcer) GetAllNamedObjects(ptype string) []string + func (e *SyncedEnforcer) GetAllNamedRoles(ptype string) []string + func (e *SyncedEnforcer) GetAllNamedSubjects(ptype string) []string + func (e *SyncedEnforcer) GetAllObjects() []string + func (e *SyncedEnforcer) GetAllRoles() []string + func (e *SyncedEnforcer) GetAllSubjects() []string + func (e *SyncedEnforcer) GetFilteredGroupingPolicy(fieldIndex int, fieldValues ...string) [][]string + func (e *SyncedEnforcer) GetFilteredNamedGroupingPolicy(ptype string, fieldIndex int, fieldValues ...string) [][]string + func (e *SyncedEnforcer) GetFilteredNamedPolicy(ptype string, fieldIndex int, fieldValues ...string) [][]string + func (e *SyncedEnforcer) GetFilteredPolicy(fieldIndex int, fieldValues ...string) [][]string + func (e *SyncedEnforcer) GetGroupingPolicy() [][]string + func (e *SyncedEnforcer) GetImplicitPermissionsForUser(user string, domain ...string) ([][]string, error) + func (e *SyncedEnforcer) GetImplicitRolesForUser(name string, domain ...string) ([]string, error) + func (e *SyncedEnforcer) GetImplicitUsersForPermission(permission ...string) ([]string, error) + func (e *SyncedEnforcer) GetLock() *sync.RWMutex + func (e *SyncedEnforcer) GetNamedGroupingPolicy(ptype string) [][]string + func (e *SyncedEnforcer) GetNamedImplicitPermissionsForUser(ptype string, user string, domain ...string) ([][]string, error) + func (e *SyncedEnforcer) GetNamedPermissionsForUser(ptype string, user string, domain ...string) [][]string + func (e *SyncedEnforcer) GetNamedPolicy(ptype string) [][]string + func (e *SyncedEnforcer) GetPermissionsForUser(user string, domain ...string) [][]string + func (e *SyncedEnforcer) GetPermissionsForUserInDomain(user string, domain string) [][]string + func (e *SyncedEnforcer) GetPolicy() [][]string + func (e *SyncedEnforcer) GetRolesForUser(name string, domain ...string) ([]string, error) + func (e *SyncedEnforcer) GetRolesForUserInDomain(name string, domain string) []string + func (e *SyncedEnforcer) GetUsersForRole(name string, domain ...string) ([]string, error) + func (e *SyncedEnforcer) GetUsersForRoleInDomain(name string, domain string) []string + func (e *SyncedEnforcer) HasGroupingPolicy(params ...interface{}) bool + func (e *SyncedEnforcer) HasNamedGroupingPolicy(ptype string, params ...interface{}) bool + func (e *SyncedEnforcer) HasNamedPolicy(ptype string, params ...interface{}) bool + func (e *SyncedEnforcer) HasPermissionForUser(user string, permission ...string) bool + func (e *SyncedEnforcer) HasPolicy(params ...interface{}) bool + func (e *SyncedEnforcer) HasRoleForUser(name string, role string, domain ...string) (bool, error) + func (e *SyncedEnforcer) IsAutoLoadingRunning() bool + func (e *SyncedEnforcer) LoadFilteredPolicy(filter interface{}) error + func (e *SyncedEnforcer) LoadIncrementalFilteredPolicy(filter interface{}) error + func (e *SyncedEnforcer) LoadModel() error + func (e *SyncedEnforcer) LoadPolicy() error + func (e *SyncedEnforcer) LoadPolicyFast() error + func (e *SyncedEnforcer) RemoveFilteredGroupingPolicy(fieldIndex int, fieldValues ...string) (bool, error) + func (e *SyncedEnforcer) RemoveFilteredNamedGroupingPolicy(ptype string, fieldIndex int, fieldValues ...string) (bool, error) + func (e *SyncedEnforcer) RemoveFilteredNamedPolicy(ptype string, fieldIndex int, fieldValues ...string) (bool, error) + func (e *SyncedEnforcer) RemoveFilteredPolicy(fieldIndex int, fieldValues ...string) (bool, error) + func (e *SyncedEnforcer) RemoveGroupingPolicies(rules [][]string) (bool, error) + func (e *SyncedEnforcer) RemoveGroupingPolicy(params ...interface{}) (bool, error) + func (e *SyncedEnforcer) RemoveNamedGroupingPolicies(ptype string, rules [][]string) (bool, error) + func (e *SyncedEnforcer) RemoveNamedGroupingPolicy(ptype string, params ...interface{}) (bool, error) + func (e *SyncedEnforcer) RemoveNamedPolicies(ptype string, rules [][]string) (bool, error) + func (e *SyncedEnforcer) RemoveNamedPolicy(ptype string, params ...interface{}) (bool, error) + func (e *SyncedEnforcer) RemovePolicies(rules [][]string) (bool, error) + func (e *SyncedEnforcer) RemovePolicy(params ...interface{}) (bool, error) + func (e *SyncedEnforcer) SavePolicy() error + func (e *SyncedEnforcer) SelfAddPolicies(sec string, ptype string, rules [][]string) (bool, error) + func (e *SyncedEnforcer) SelfAddPoliciesEx(sec string, ptype string, rules [][]string) (bool, error) + func (e *SyncedEnforcer) SelfAddPolicy(sec string, ptype string, rule []string) (bool, error) + func (e *SyncedEnforcer) SelfRemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) (bool, error) + func (e *SyncedEnforcer) SelfRemovePolicies(sec string, ptype string, rules [][]string) (bool, error) + func (e *SyncedEnforcer) SelfRemovePolicy(sec string, ptype string, rule []string) (bool, error) + func (e *SyncedEnforcer) SelfUpdatePolicies(sec string, ptype string, oldRules, newRules [][]string) (bool, error) + func (e *SyncedEnforcer) SelfUpdatePolicy(sec string, ptype string, oldRule, newRule []string) (bool, error) + func (e *SyncedEnforcer) SetWatcher(watcher persist.Watcher) error + func (e *SyncedEnforcer) StartAutoLoadPolicy(d time.Duration) + func (e *SyncedEnforcer) StopAutoLoadPolicy() + func (e *SyncedEnforcer) UpdateFilteredNamedPolicies(ptype string, newPolicies [][]string, fieldIndex int, fieldValues ...string) (bool, error) + func (e *SyncedEnforcer) UpdateFilteredPolicies(newPolicies [][]string, fieldIndex int, fieldValues ...string) (bool, error) + func (e *SyncedEnforcer) UpdateGroupingPolicies(oldRules [][]string, newRules [][]string) (bool, error) + func (e *SyncedEnforcer) UpdateGroupingPolicy(oldRule []string, newRule []string) (bool, error) + func (e *SyncedEnforcer) UpdateNamedGroupingPolicies(ptype string, oldRules [][]string, newRules [][]string) (bool, error) + func (e *SyncedEnforcer) UpdateNamedGroupingPolicy(ptype string, oldRule []string, newRule []string) (bool, error) + func (e *SyncedEnforcer) UpdateNamedPolicies(ptype string, p1 [][]string, p2 [][]string) (bool, error) + func (e *SyncedEnforcer) UpdateNamedPolicy(ptype string, p1 []string, p2 []string) (bool, error) + func (e *SyncedEnforcer) UpdatePolicies(oldPolices [][]string, newPolicies [][]string) (bool, error) + func (e *SyncedEnforcer) UpdatePolicy(oldPolicy []string, newPolicy []string) (bool, error)