cpp

package
v1.11.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 7, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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 New

func New(log *logger.Logger, options *Options) *Compiler

New creates a new C++ compiler

func (*Compiler) Compile

Compile compiles proto files to C++

func (*Compiler) GetOutputPath

func (c *Compiler) GetOutputPath(file compiler.ProtoFile, opts compiler.CompileOptions) string

GetOutputPath returns the output path for a proto file

func (*Compiler) Name

func (c *Compiler) Name() string

Name returns the compiler name

func (*Compiler) RequiredTools

func (c *Compiler) RequiredTools() []string

RequiredTools returns the list of required external tools

func (*Compiler) Validate

func (c *Compiler) Validate() error

Validate checks if the compiler is properly configured

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL