Versions in this module Expand all Collapse all v2 v2.80.1 Jan 10, 2024 v2.80.0 Dec 27, 2023 Changes in this version + const DefaultSep + type Assertion struct + CondRM rbac.ConditionalRoleManager + FieldIndexMap map[string]int + Key string + ParamsTokens []string + Policy [][]string + PolicyMap map[string]int + RM rbac.RoleManager + Tokens []string + Value string + type AssertionMap map[string]*Assertion + type FunctionMap struct + func LoadFunctionMap() FunctionMap + func (fm *FunctionMap) AddFunction(name string, function govaluate.ExpressionFunction) + func (fm *FunctionMap) GetFunctions() map[string]govaluate.ExpressionFunction + type Model map[string]AssertionMap + func NewModel() Model + func NewModelFromFile(path string) (Model, error) + func NewModelFromString(text string) (Model, error) + func (model Model) AddDef(sec string, key string, value string) bool + func (model Model) AddPolicies(sec string, ptype string, rules [][]string) + func (model Model) AddPoliciesWithAffected(sec string, ptype string, rules [][]string) [][]string + func (model Model) AddPolicy(sec string, ptype string, rule []string) + func (model Model) BuildConditionalRoleLinks(condRmMap map[string]rbac.ConditionalRoleManager) error + func (model Model) BuildIncrementalConditionalRoleLinks(condRmMap map[string]rbac.ConditionalRoleManager, op PolicyOp, sec string, ...) error + func (model Model) BuildIncrementalRoleLinks(rmMap map[string]rbac.RoleManager, op PolicyOp, sec string, ptype string, ...) error + func (model Model) BuildRoleLinks(rmMap map[string]rbac.RoleManager) error + func (model Model) ClearPolicy() + func (model Model) Copy() Model + func (model Model) GetFieldIndex(ptype string, field string) (int, error) + func (model Model) GetFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) [][]string + func (model Model) GetLogger() log.Logger + func (model Model) GetPolicy(sec string, ptype string) [][]string + func (model Model) GetValuesForFieldInPolicy(sec string, ptype string, fieldIndex int) []string + func (model Model) GetValuesForFieldInPolicyAllTypes(sec string, fieldIndex int) []string + func (model Model) HasPolicies(sec string, ptype string, rules [][]string) bool + func (model Model) HasPolicy(sec string, ptype string, rule []string) bool + func (model Model) HasPolicyEx(sec string, ptype string, rule []string) (bool, error) + func (model Model) LoadModel(path string) error + func (model Model) LoadModelFromText(text string) error + func (model Model) PrintModel() + func (model Model) PrintPolicy() + func (model Model) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) (bool, [][]string) + func (model Model) RemovePolicies(sec string, ptype string, rules [][]string) bool + func (model Model) RemovePoliciesWithAffected(sec string, ptype string, rules [][]string) [][]string + func (model Model) RemovePolicy(sec string, ptype string, rule []string) bool + func (model Model) SetLogger(logger log.Logger) + func (model Model) SortPoliciesByPriority() error + func (model Model) SortPoliciesBySubjectHierarchy() error + func (model Model) ToText() string + func (model Model) UpdatePolicies(sec string, ptype string, oldRules, newRules [][]string) bool + func (model Model) UpdatePolicy(sec string, ptype string, oldRule []string, newRule []string) bool + type PolicyOp int + const PolicyAdd + const PolicyRemove