Adapter is the interface for Casbin adapters.
| 62 | |
| 63 | // Adapter is the interface for Casbin adapters. |
| 64 | type Adapter interface { |
| 65 | // LoadPolicy loads all policy rules from the storage. |
| 66 | LoadPolicy(model model.Model) error |
| 67 | // SavePolicy saves all policy rules to the storage. |
| 68 | SavePolicy(model model.Model) error |
| 69 | |
| 70 | // AddPolicy adds a policy rule to the storage. |
| 71 | // This is part of the Auto-Save feature. |
| 72 | AddPolicy(sec string, ptype string, rule []string) error |
| 73 | // RemovePolicy removes a policy rule from the storage. |
| 74 | // This is part of the Auto-Save feature. |
| 75 | RemovePolicy(sec string, ptype string, rule []string) error |
| 76 | // RemoveFilteredPolicy removes policy rules that match the filter from the storage. |
| 77 | // This is part of the Auto-Save feature. |
| 78 | RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error |
| 79 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…