aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/flatbuffers/grpc/src/compiler/go_generator.h
blob: 766e100c584b7daadeaf78239cde753dd325e262 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef GRPC_INTERNAL_COMPILER_GO_GENERATOR_H
#define GRPC_INTERNAL_COMPILER_GO_GENERATOR_H

// go generator is used to generate GRPC code for serialization system, such as
// flatbuffers
#include <memory>
#include <vector>

#include "src/compiler/schema_interface.h"

namespace grpc_go_generator {

struct Parameters {
  // Defines the custom parameter types for methods
  // eg: flatbuffers uses flatbuffers.Builder as input for the client and output
  // for the server
  grpc::string custom_method_io_type;

  // Package name for the service
  grpc::string package_name;

  // Prefix for RPC Calls
  grpc::string service_prefix;
};

// Return the source of the generated service file.
grpc::string GenerateServiceSource(grpc_generator::File *file,
                                   const grpc_generator::Service *service,
                                   grpc_go_generator::Parameters *parameters);

}  // namespace grpc_go_generator

#endif  // GRPC_INTERNAL_COMPILER_GO_GENERATOR_H