Documentation ¶
Index ¶
- type Adapter
- func (adapter *Adapter) AddPolicy(sec string, ptype string, rule []string) error
- func (adapter *Adapter) LoadPolicy(cmodel cModel.Model) error
- func (adapter *Adapter) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error
- func (adapter *Adapter) RemovePolicy(sec string, ptype string, rule []string) error
- func (adapter *Adapter) SavePolicy(cmodel cModel.Model) error
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 is a postgresql adaptor for casbin
func NewAdapter ¶
NewAdapter returns a new casbin postgresql adapter
func (*Adapter) AddPolicy ¶
AddPolicy adds a policy rule to the storage. This is part of the Auto-Save feature.
func (*Adapter) LoadPolicy ¶
LoadPolicy loads all policy rules from the storage.
func (*Adapter) RemoveFilteredPolicy ¶
func (adapter *Adapter) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error
RemoveFilteredPolicy removes policy rules that match the filter from the storage. This is part of the Auto-Save feature.
func (*Adapter) RemovePolicy ¶
RemovePolicy removes a policy rule from the storage. This is part of the Auto-Save feature.
Click to show internal directories.
Click to hide internal directories.