Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicCompiler ¶
BasicCompiler is the basic implement of Compiler
func NewBasicCompiler ¶
func NewBasicCompiler( ctx context.Context, log logger.Logger, pluginManager pluginmanager.PluginManager, config configs.ConfigItem, ) (*BasicCompiler, error)
NewBasicCompiler is used to create a basic compiler
func (*BasicCompiler) Compile ¶
func (b *BasicCompiler) Compile(ctx context.Context, protoFilePath string) error
Compile is used to compile proto file
func (*BasicCompiler) GetConfig ¶
func (b *BasicCompiler) GetConfig(ctx context.Context) configs.ConfigItem
GetConfig is used to return config that the compiler used
type BasicCompilerManager ¶
BasicCompilerManager is the basic implement of CompilerManager
func NewBasicCompilerManager ¶
func NewBasicCompilerManager(ctx context.Context, log logger.Logger, configManager configmanager.ConfigManager, pluginManager pluginmanager.PluginManager, ) (*BasicCompilerManager, error)
NewBasicCompilerManager is used to create basic CompilerManager
func (*BasicCompilerManager) GetCompiler ¶
func (b *BasicCompilerManager) GetCompiler(ctx context.Context, protoFilePath string) (Compiler, error)
GetCompiler is used to get compiler of specified proto file path
type Compiler ¶
type Compiler interface { // Compile is used to compile proto file Compile(ctx context.Context, protoFilePath string) error // GetConfig is used to return config that the compiler used GetConfig(ctx context.Context) configs.ConfigItem }
Compiler is used to compile proto file
func NewCompiler ¶
func NewCompiler( ctx context.Context, log logger.Logger, pluginManager pluginmanager.PluginManager, config configs.ConfigItem, ) (Compiler, error)
NewCompiler is used to create a compiler
type CompilerManager ¶
type CompilerManager interface { // GetCompiler is used to get compiler of specified proto file path GetCompiler(ctx context.Context, protoFilePath string) (Compiler, error) }
CompilerManager is to manage compiler
func NewCompilerManager ¶
func NewCompilerManager(ctx context.Context, log logger.Logger, configManager configmanager.ConfigManager, pluginManager pluginmanager.PluginManager, ) (CompilerManager, error)
NewCompilerManager is used to create CompilerManager
type ErrCompile ¶
type ErrCompile struct {
*command.ErrCommandExec
}
ErrCompile defines the compile error
Click to show internal directories.
Click to hide internal directories.