BatchEnforce enforce in batches.
(requests [][]interface{})
| 949 | |
| 950 | // BatchEnforce enforce in batches. |
| 951 | func (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. |
| 964 | func (e *Enforcer) BatchEnforceWithMatcher(matcher string, requests [][]interface{}) ([]bool, error) { |