| 65 | } |
| 66 | |
| 67 | absl::Status RegisterEncodersDecls(TypeCheckerBuilder& builder) { |
| 68 | CEL_ASSIGN_OR_RETURN( |
| 69 | auto base64_decode_decl, |
| 70 | MakeFunctionDecl( |
| 71 | "base64.decode", |
| 72 | MakeOverloadDecl("base64_decode_string", BytesType(), StringType()))); |
| 73 | |
| 74 | CEL_ASSIGN_OR_RETURN( |
| 75 | auto base64_encode_decl, |
| 76 | MakeFunctionDecl( |
| 77 | "base64.encode", |
| 78 | MakeOverloadDecl("base64_encode_bytes", StringType(), BytesType()))); |
| 79 | |
| 80 | CEL_RETURN_IF_ERROR(builder.AddFunction(base64_decode_decl)); |
| 81 | CEL_RETURN_IF_ERROR(builder.AddFunction(base64_encode_decl)); |
| 82 | return absl::OkStatus(); |
| 83 | } |
| 84 | |
| 85 | } // namespace |
| 86 |
nothing calls this directly
no test coverage detected