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

Interface ContextUpdatableAdapter

persist/update_adapter_context.go:20–30  ·  view source on GitHub ↗

ContextUpdatableAdapter is the context-aware interface for Casbin adapters with add update policy function.

Source from the content-addressed store, hash-verified

18
19// ContextUpdatableAdapter is the context-aware interface for Casbin adapters with add update policy function.
20type ContextUpdatableAdapter interface {
21 ContextAdapter
22
23 // UpdatePolicyCtx updates a policy rule from storage.
24 // This is part of the Auto-Save feature.
25 UpdatePolicyCtx(ctx context.Context, sec string, ptype string, oldRule, newRule []string) error
26 // UpdatePoliciesCtx updates some policy rules to storage, like db, redis.
27 UpdatePoliciesCtx(ctx context.Context, sec string, ptype string, oldRules, newRules [][]string) error
28 // UpdateFilteredPoliciesCtx deletes old rules and adds new rules.
29 UpdateFilteredPoliciesCtx(ctx context.Context, sec string, ptype string, newRules [][]string, fieldIndex int, fieldValues ...string) ([][]string, error)
30}

Callers

nothing calls this directly

Implementers 2

ContextEnforcerenforcer_context.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…