MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / RegisterEncodersFunctions

Function RegisterEncodersFunctions

extensions/encoders.cc:87–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85} // namespace
86
87absl::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
103absl::Status RegisterEncodersFunctions(
104 google::api::expr::runtime::CelFunctionRegistry* absl_nonnull registry,

Callers 4

TEST_PFunction · 0.85
CreateMethod · 0.85
SetupMethod · 0.85

Calls 3

CreateDescriptorFunction · 0.85
ConvertToRuntimeOptionsFunction · 0.85
RegisterMethod · 0.45

Tested by 1

TEST_PFunction · 0.68