Documentation
¶
Index ¶
- type Compiler
- func (c *Compiler) Compile(ctx context.Context, files []compiler.ProtoFile, opts compiler.CompileOptions) (*compiler.CompileResult, error)
- func (c *Compiler) GetOutputPath(file compiler.ProtoFile, opts compiler.CompileOptions) string
- func (c *Compiler) Name() string
- func (c *Compiler) RequiredTools() []string
- func (c *Compiler) Validate() error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
Compiler implements C++ protobuf/gRPC compiler
func (*Compiler) Compile ¶
func (c *Compiler) Compile(ctx context.Context, files []compiler.ProtoFile, opts compiler.CompileOptions) (*compiler.CompileResult, error)
Compile compiles proto files to C++
func (*Compiler) GetOutputPath ¶
GetOutputPath returns the output path for a proto file
func (*Compiler) RequiredTools ¶
RequiredTools returns the list of required external tools
type Options ¶
type Options struct {
ProtocPath string // Path to protoc executable
GrpcCppPluginPath string // Path to grpc_cpp_plugin
GenerateGrpc bool // Generate gRPC code
Namespace string // C++ namespace
}
Options contains C++ compiler options
func DefaultOptions ¶
func DefaultOptions() Options
DefaultOptions returns default C++ compiler options
Click to show internal directories.
Click to hide internal directories.