MCPcopy Index your code
hub / github.com/apache/casbin / SetDetector

Method SetDetector

enforcer.go:301–303  ·  view source on GitHub ↗

SetDetector sets a single detector for the enforcer.

(d detector.Detector)

Source from the content-addressed store, hash-verified

299
300// SetDetector sets a single detector for the enforcer.
301func (e *Enforcer) SetDetector(d detector.Detector) {
302 e.detectors = []detector.Detector{d}
303}
304
305// SetDetectors sets multiple detectors for the enforcer.
306func (e *Enforcer) SetDetectors(detectors []detector.Detector) {

Callers 1

TestEnforcerSetDetectorFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestEnforcerSetDetectorFunction · 0.76