| 34 | namespace google::api::expr::runtime { |
| 35 | |
| 36 | absl::Status RegisterBuiltinFunctions(CelFunctionRegistry* registry, |
| 37 | const InterpreterOptions& options) { |
| 38 | cel::FunctionRegistry& modern_registry = registry->InternalGetRegistry(); |
| 39 | cel::RuntimeOptions runtime_options = ConvertToRuntimeOptions(options); |
| 40 | |
| 41 | CEL_RETURN_IF_ERROR( |
| 42 | cel::RegisterLogicalFunctions(modern_registry, runtime_options)); |
| 43 | CEL_RETURN_IF_ERROR( |
| 44 | cel::RegisterComparisonFunctions(modern_registry, runtime_options)); |
| 45 | CEL_RETURN_IF_ERROR( |
| 46 | cel::RegisterContainerFunctions(modern_registry, runtime_options)); |
| 47 | CEL_RETURN_IF_ERROR(cel::RegisterContainerMembershipFunctions( |
| 48 | modern_registry, runtime_options)); |
| 49 | CEL_RETURN_IF_ERROR( |
| 50 | cel::RegisterTypeConversionFunctions(modern_registry, runtime_options)); |
| 51 | CEL_RETURN_IF_ERROR( |
| 52 | cel::RegisterArithmeticFunctions(modern_registry, runtime_options)); |
| 53 | CEL_RETURN_IF_ERROR( |
| 54 | cel::RegisterTimeFunctions(modern_registry, runtime_options)); |
| 55 | CEL_RETURN_IF_ERROR( |
| 56 | cel::RegisterStringFunctions(modern_registry, runtime_options)); |
| 57 | CEL_RETURN_IF_ERROR( |
| 58 | cel::RegisterRegexFunctions(modern_registry, runtime_options)); |
| 59 | CEL_RETURN_IF_ERROR( |
| 60 | cel::RegisterEqualityFunctions(modern_registry, runtime_options)); |
| 61 | |
| 62 | return absl::OkStatus(); |
| 63 | } |
| 64 | |
| 65 | } // namespace google::api::expr::runtime |