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

Method SetAdapter

enforcer.go:240–242  ·  view source on GitHub ↗

SetAdapter sets the current adapter.

(adapter persist.Adapter)

Source from the content-addressed store, hash-verified

238
239// SetAdapter sets the current adapter.
240func (e *Enforcer) SetAdapter(adapter persist.Adapter) {
241 e.adapter = adapter
242}
243
244// SetWatcher sets the current watcher.
245func (e *Enforcer) SetWatcher(watcher persist.Watcher) error {

Callers 4

TestSetAdapterFromFileFunction · 0.95
TestInitEmptyFunction · 0.95
TestFailedToLoadPolicyFunction · 0.95

Calls

no outgoing calls

Tested by 4

TestSetAdapterFromFileFunction · 0.76
TestInitEmptyFunction · 0.76
TestFailedToLoadPolicyFunction · 0.76