Documentation
¶
Overview ¶
Package readeradapter provides a Casbin adapter for reading policy from an io.Reader source.
Index ¶
- type Adapter
- func (a *Adapter) AddPolicy(_ string, _ string, _ []string) error
- func (a *Adapter) LoadPolicy(model model.Model) error
- func (a *Adapter) RemoveFilteredPolicy(_ string, _ string, _ int, _ ...string) error
- func (a *Adapter) RemovePolicy(_ string, _ string, _ []string) error
- func (a *Adapter) SavePolicy(_ model.Model) error
- func (a *Adapter) SetContent(content string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter reads a policy from an io.Reader source.
func (*Adapter) LoadPolicy ¶
LoadPolicy loads all policy rules from the storage.
func (*Adapter) RemoveFilteredPolicy ¶
RemoveFilteredPolicy removes policy rules that match the filter from the storage.
func (*Adapter) RemovePolicy ¶
RemovePolicy removes a policy rule from the storage.
func (*Adapter) SavePolicy ¶
SavePolicy saves all policy rules to the storage.
func (*Adapter) SetContent ¶
SetContent sets the content of the adapter.
Click to show internal directories.
Click to hide internal directories.