| 330 | } |
| 331 | |
| 332 | cel::Value parseAddressMatcher( |
| 333 | const cel::StringValue& str, |
| 334 | const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool, |
| 335 | google::protobuf::MessageFactory* absl_nonnull message_factory, |
| 336 | google::protobuf::Arena* absl_nonnull arena) { |
| 337 | std::string buf; |
| 338 | absl::string_view addr = str.ToStringView(&buf); |
| 339 | absl::optional<NetworkAddressMatcher> rep = |
| 340 | NetworkAddressMatcher::Parse(addr); |
| 341 | if (!rep.has_value()) { |
| 342 | return cel::ErrorValue( |
| 343 | absl::InvalidArgumentError("invalid address matcher")); |
| 344 | } |
| 345 | |
| 346 | return NetworkAddressMatcher::MakeValue(arena, std::move(rep).value()); |
| 347 | } |
| 348 | |
| 349 | cel::Value containsAddress(const cel::OpaqueValue& matcher, |
| 350 | const cel::OpaqueValue& addr) { |
nothing calls this directly
no test coverage detected