| 521 | } |
| 522 | |
| 523 | absl::Status RegisterNetworkFunctions(cel::FunctionRegistry& registry, |
| 524 | const cel::RuntimeOptions& options) { |
| 525 | // TODO(uncreated-issue/86): remaining functions |
| 526 | auto s = cel::UnaryFunctionAdapter<cel::Value, const cel::StringValue&>:: |
| 527 | RegisterGlobalOverload("net.parseAddress", &parseAddress, registry); |
| 528 | s.Update(cel::UnaryFunctionAdapter<cel::Value, const cel::StringValue&>:: |
| 529 | RegisterGlobalOverload("net.parseAddressOrZero", |
| 530 | &parseAddressOrZero, registry)); |
| 531 | |
| 532 | s.Update(cel::UnaryFunctionAdapter<cel::Value, const cel::StringValue&>:: |
| 533 | RegisterGlobalOverload("net.parseAddressMatcher", |
| 534 | &parseAddressMatcher, registry)); |
| 535 | s.Update(cel::BinaryFunctionAdapter< |
| 536 | cel::Value, const cel::OpaqueValue&, |
| 537 | const cel::OpaqueValue&>::RegisterMemberOverload("containsAddress", |
| 538 | &containsAddress, |
| 539 | registry)); |
| 540 | return s; |
| 541 | } |
| 542 | |
| 543 | } // namespace cel_codelab |
no outgoing calls