MCPcopy
hub / github.com/apache/casbin / UpdatableAdapter

Interface UpdatableAdapter

persist/update_adapter.go:18–27  ·  view source on GitHub ↗

UpdatableAdapter is the interface for Casbin adapters with add update policy function.

Source from the content-addressed store, hash-verified

16
17// UpdatableAdapter is the interface for Casbin adapters with add update policy function.
18type 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}

Callers

nothing calls this directly

Implementers 3

Enforcerenforcer.go
SyncedEnforcerenforcer_synced.go
Adapterpersist/file-adapter/adapter.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…