Documentation ¶
Index ¶
- func LoadPolicyLine(line string, m api.IAddRuleBool) error
- type FileAdapter
- func (a *FileAdapter) AddRule(rule []string) error
- func (a *FileAdapter) AddRules(rules [][]string) error
- func (a *FileAdapter) LoadPolicy(model api.IAddRuleBool) error
- func (a *FileAdapter) RemoveRule(rule []string) error
- func (a *FileAdapter) RemoveRules(rules [][]string) error
- func (a *FileAdapter) SavePolicy(model api.IRangeRules) error
- type NoopAdapter
- type RuleSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadPolicyLine ¶
func LoadPolicyLine(line string, m api.IAddRuleBool) error
LoadPolicyLine loads a text line as a policy rule to model.
Types ¶
type FileAdapter ¶
type FileAdapter struct {
// contains filtered or unexported fields
}
func NewFileAdapter ¶
func NewFileAdapter(path string) *FileAdapter
func (*FileAdapter) AddRule ¶
func (a *FileAdapter) AddRule(rule []string) error
func (*FileAdapter) AddRules ¶
func (a *FileAdapter) AddRules(rules [][]string) error
func (*FileAdapter) LoadPolicy ¶
func (a *FileAdapter) LoadPolicy(model api.IAddRuleBool) error
func (*FileAdapter) RemoveRule ¶
func (a *FileAdapter) RemoveRule(rule []string) error
func (*FileAdapter) RemoveRules ¶
func (a *FileAdapter) RemoveRules(rules [][]string) error
func (*FileAdapter) SavePolicy ¶
func (a *FileAdapter) SavePolicy(model api.IRangeRules) error
type NoopAdapter ¶
type NoopAdapter struct{}
func (*NoopAdapter) AddRule ¶
func (a *NoopAdapter) AddRule(rule []string) error
func (*NoopAdapter) LoadPolicy ¶
func (a *NoopAdapter) LoadPolicy(model api.IAddRuleBool) error
func (*NoopAdapter) RemoveRule ¶
func (a *NoopAdapter) RemoveRule(rule []string) error
func (*NoopAdapter) SavePolicy ¶
func (a *NoopAdapter) SavePolicy(model api.IRangeRules) error
Click to show internal directories.
Click to hide internal directories.