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

Method BatchEnforce

enforcer.go:951–961  ·  view source on GitHub ↗

BatchEnforce enforce in batches.

(requests [][]interface{})

Source from the content-addressed store, hash-verified

949
950// BatchEnforce enforce in batches.
951func (e *Enforcer) BatchEnforce(requests [][]interface{}) ([]bool, error) {
952 var results []bool
953 for _, request := range requests {
954 result, err := e.enforce("", nil, request...)
955 if err != nil {
956 return results, err
957 }
958 results = append(results, result)
959 }
960 return results, nil
961}
962
963// BatchEnforceWithMatcher enforce with matcher in batches.
964func (e *Enforcer) BatchEnforceWithMatcher(matcher string, requests [][]interface{}) ([]bool, error) {

Callers

nothing calls this directly

Calls 1

enforceMethod · 0.95

Tested by

no test coverage detected