diff options
author | David G. Quintas <dgq@google.com> | 2018-10-16 14:42:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-16 14:42:37 -0700 |
commit | a464b4ce3971660e81a4a7a79f3ddab6340d16e6 (patch) | |
tree | 47032ea793781a2f70bd7bff20585bb5447b0ecd /test/cpp/util/proto_file_parser.h | |
parent | 8e626a8de1ce101bf4d1fd8856c87de1cc43f7bd (diff) |
Revert "grpc_cli json support"
Diffstat (limited to 'test/cpp/util/proto_file_parser.h')
-rw-r--r-- | test/cpp/util/proto_file_parser.h | 52 |
1 files changed, 12 insertions, 40 deletions
diff --git a/test/cpp/util/proto_file_parser.h b/test/cpp/util/proto_file_parser.h index 1e49c98daf..eb1d793c2b 100644 --- a/test/cpp/util/proto_file_parser.h +++ b/test/cpp/util/proto_file_parser.h @@ -53,49 +53,21 @@ class ProtoFileParser { // used as the argument of Stub::Call() grpc::string GetFormattedMethodName(const grpc::string& method); - /// Converts a text or json string to its binary proto representation for the - /// given method's input or return type. - /// \param method the name of the method (does not need to be fully qualified - /// name) - /// \param formatted_proto the text- or json-formatted proto string - /// \param is_request if \c true the resolved type is that of the input - /// parameter of the method, otherwise it is the output type - /// \param is_json_format if \c true the \c formatted_proto is treated as a - /// json-formatted proto, otherwise it is treated as a text-formatted - /// proto - /// \return the serialised binary proto represenation of \c formatted_proto - grpc::string GetSerializedProtoFromMethod(const grpc::string& method, - const grpc::string& formatted_proto, - bool is_request, - bool is_json_format); - - /// Converts a text or json string to its proto representation for the given - /// message type. - /// \param formatted_proto the text- or json-formatted proto string - /// \return the serialised binary proto represenation of \c formatted_proto + grpc::string GetSerializedProtoFromMethod( + const grpc::string& method, const grpc::string& text_format_proto, + bool is_request); + + grpc::string GetTextFormatFromMethod(const grpc::string& method, + const grpc::string& serialized_proto, + bool is_request); + grpc::string GetSerializedProtoFromMessageType( const grpc::string& message_type_name, - const grpc::string& formatted_proto, bool is_json_format); - - /// Converts a binary proto string to its text or json string representation - /// for the given method's input or return type. - /// \param method the name of the method (does not need to be a fully - /// qualified name) - /// \param the serialised binary proto representation of type - /// \c message_type_name - /// \return the text- or json-formatted proto string of \c serialized_proto - grpc::string GetFormattedStringFromMethod( - const grpc::string& method, const grpc::string& serialized_proto, - bool is_request, bool is_json_format); - - /// Converts a binary proto string to its text or json string representation - /// for the given message type. - /// \param the serialised binary proto representation of type - /// \c message_type_name - /// \return the text- or json-formatted proto string of \c serialized_proto - grpc::string GetFormattedStringFromMessageType( + const grpc::string& text_format_proto); + + grpc::string GetTextFormatFromMessageType( const grpc::string& message_type_name, - const grpc::string& serialized_proto, bool is_json_format); + const grpc::string& serialized_proto); bool IsStreaming(const grpc::string& method, bool is_request); |