| 85 | } // namespace |
| 86 | |
| 87 | absl::Status RegisterEncodersFunctions(FunctionRegistry& registry, |
| 88 | const RuntimeOptions&) { |
| 89 | CEL_RETURN_IF_ERROR(registry.Register( |
| 90 | UnaryFunctionAdapter<absl::StatusOr<Value>, |
| 91 | StringValue>::CreateDescriptor("base64.decode", |
| 92 | false), |
| 93 | UnaryFunctionAdapter<absl::StatusOr<Value>, StringValue>::WrapFunction( |
| 94 | &Base64Decode))); |
| 95 | CEL_RETURN_IF_ERROR(registry.Register( |
| 96 | UnaryFunctionAdapter<absl::StatusOr<Value>, BytesValue>::CreateDescriptor( |
| 97 | "base64.encode", false), |
| 98 | UnaryFunctionAdapter<absl::StatusOr<Value>, BytesValue>::WrapFunction( |
| 99 | &Base64Encode))); |
| 100 | return absl::OkStatus(); |
| 101 | } |
| 102 | |
| 103 | absl::Status RegisterEncodersFunctions( |
| 104 | google::api::expr::runtime::CelFunctionRegistry* absl_nonnull registry, |