Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 1 | #ifndef GRPC_INTERNAL_COMPILER_GO_GENERATOR_H |
| 2 | #define GRPC_INTERNAL_COMPILER_GO_GENERATOR_H |
| 3 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame^] | 4 | // go generator is used to generate GRPC code for serialization system, such as |
| 5 | // flatbuffers |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 6 | #include <memory> |
| 7 | #include <vector> |
| 8 | |
| 9 | #include "src/compiler/schema_interface.h" |
| 10 | |
| 11 | namespace grpc_go_generator { |
| 12 | |
| 13 | struct Parameters { |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame^] | 14 | // Defines the custom parameter types for methods |
| 15 | // eg: flatbuffers uses flatbuffers.Builder as input for the client and output |
| 16 | // for the server |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 17 | grpc::string custom_method_io_type; |
| 18 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame^] | 19 | // Package name for the service |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 20 | grpc::string package_name; |
| 21 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame^] | 22 | // Prefix for RPC Calls |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 23 | grpc::string service_prefix; |
| 24 | }; |
| 25 | |
| 26 | // Return the source of the generated service file. |
| 27 | grpc::string GenerateServiceSource(grpc_generator::File *file, |
| 28 | const grpc_generator::Service *service, |
| 29 | grpc_go_generator::Parameters *parameters); |
| 30 | |
James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame^] | 31 | } // namespace grpc_go_generator |
Austin Schuh | e89fa2d | 2019-08-14 20:24:23 -0700 | [diff] [blame] | 32 | |
| 33 | #endif // GRPC_INTERNAL_COMPILER_GO_GENERATOR_H |