Versions in this module Expand all Collapse all v1 v1.6.0 Aug 15, 2018 v1.5.0 Apr 20, 2018 Changes in this version + type Adapter struct + func NewAdapter(filePath string) *Adapter + func (a *Adapter) AddPolicy(sec string, ptype string, rule []string) error + func (a *Adapter) LoadPolicy(model model.Model) error + func (a *Adapter) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error + func (a *Adapter) RemovePolicy(sec string, ptype string, rule []string) error + func (a *Adapter) SavePolicy(model model.Model) error + type AdapterMock struct + func NewAdapterMock(filePath string) *AdapterMock + func (a *AdapterMock) AddPolicy(sec string, ptype string, rule []string) error + func (a *AdapterMock) GetMockErr() error + func (a *AdapterMock) LoadPolicy(model model.Model) error + func (a *AdapterMock) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error + func (a *AdapterMock) RemovePolicy(sec string, ptype string, rule []string) error + func (a *AdapterMock) SavePolicy(model model.Model) error + func (a *AdapterMock) SetMockErr(errorToSet string) + type Filter struct + G []string + P []string + type FilteredAdapter struct + func NewFilteredAdapter(filePath string) *FilteredAdapter + func (a *FilteredAdapter) IsFiltered() bool + func (a *FilteredAdapter) LoadFilteredPolicy(model model.Model, filter interface{}) error + func (a *FilteredAdapter) LoadPolicy(model model.Model) error + func (a *FilteredAdapter) SavePolicy(model model.Model) error