| 48 | DefaultAttributeMatcher::DefaultAttributeMatcher() = default; |
| 49 | |
| 50 | AttributeMatcher::MatchResult MatchAgainstPatterns( |
| 51 | absl::Span<const AttributePattern> patterns, const Attribute& attr) { |
| 52 | MatchResult result = MatchResult::NONE; |
| 53 | for (const auto& pattern : patterns) { |
| 54 | auto current_match = pattern.IsMatch(attr); |
| 55 | if (current_match == cel::AttributePattern::MatchType::FULL) { |
| 56 | return MatchResult::FULL; |
| 57 | } |
| 58 | if (current_match == cel::AttributePattern::MatchType::PARTIAL) { |
| 59 | result = MatchResult::PARTIAL; |
| 60 | } |
| 61 | } |
| 62 | return result; |
| 63 | } |
| 64 | |
| 65 | DefaultAttributeMatcher::MatchResult DefaultAttributeMatcher::CheckForUnknown( |
| 66 | const Attribute& attr) const { |
no test coverage detected