UpdatableAdapter is the interface for Casbin adapters with add update policy function.
| 16 | |
| 17 | // UpdatableAdapter is the interface for Casbin adapters with add update policy function. |
| 18 | type UpdatableAdapter interface { |
| 19 | Adapter |
| 20 | // UpdatePolicy updates a policy rule from storage. |
| 21 | // This is part of the Auto-Save feature. |
| 22 | UpdatePolicy(sec string, ptype string, oldRule, newRule []string) error |
| 23 | // UpdatePolicies updates some policy rules to storage, like db, redis. |
| 24 | UpdatePolicies(sec string, ptype string, oldRules, newRules [][]string) error |
| 25 | // UpdateFilteredPolicies deletes old rules and adds new rules. |
| 26 | UpdateFilteredPolicies(sec string, ptype string, newRules [][]string, fieldIndex int, fieldValues ...string) ([][]string, error) |
| 27 | } |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…