Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsBuiltinPlugin ¶ added in v0.9.0
IsBuiltinPlugin checks if the plugin is builtin (supported via go-protobuf-gen-builtins)
Types ¶
type BuiltinPluginExecutor ¶ added in v0.9.0
type BuiltinPluginExecutor struct {
// contains filtered or unexported fields
}
BuiltinPluginExecutor executes builtin plugins via WASM
func NewBuiltinPluginExecutor ¶ added in v0.9.0
func NewBuiltinPluginExecutor(logger *slog.Logger) *BuiltinPluginExecutor
NewBuiltinPluginExecutor creates a new BuiltinPluginExecutor
func (*BuiltinPluginExecutor) Execute ¶ added in v0.9.0
func (e *BuiltinPluginExecutor) Execute(ctx context.Context, plugin Info, request *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorResponse, error)
Execute executes a builtin plugin via WASM
func (*BuiltinPluginExecutor) GetName ¶ added in v0.9.0
func (e *BuiltinPluginExecutor) GetName() string
GetName returns the name of the executor
type CommandPluginExecutor ¶ added in v0.10.0
type CommandPluginExecutor struct {
// contains filtered or unexported fields
}
CommandPluginExecutor executes plugins via custom command
func NewCommandPluginExecutor ¶ added in v0.10.0
func NewCommandPluginExecutor(console console.Console, logger *slog.Logger) *CommandPluginExecutor
NewCommandPluginExecutor creates a new CommandPluginExecutor
func (*CommandPluginExecutor) Execute ¶ added in v0.10.0
func (e *CommandPluginExecutor) Execute(ctx context.Context, plugin Info, request *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorResponse, error)
Execute executes a plugin via custom command
func (*CommandPluginExecutor) GetName ¶ added in v0.10.0
func (e *CommandPluginExecutor) GetName() string
GetName returns the name of the executor
type Executor ¶
type Executor interface {
Execute(ctx context.Context, plugin Info, request *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorResponse, error)
GetName() string
}
type LocalPluginExecutor ¶
type LocalPluginExecutor struct {
// contains filtered or unexported fields
}
LocalPluginExecutor executes plugins locally via terminal
func NewLocalPluginExecutor ¶
func NewLocalPluginExecutor(console console.Console, logger *slog.Logger) *LocalPluginExecutor
NewLocalPluginExecutor creates a new LocalPluginExecutor
func (*LocalPluginExecutor) Execute ¶
func (e *LocalPluginExecutor) Execute(ctx context.Context, plugin Info, request *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorResponse, error)
Execute executes a local plugin via terminal
func (*LocalPluginExecutor) GetName ¶ added in v0.9.0
func (e *LocalPluginExecutor) GetName() string
type RemotePluginExecutor ¶
type RemotePluginExecutor struct {
// contains filtered or unexported fields
}
RemotePluginExecutor executes plugins remotely via gRPC
func NewRemotePluginExecutor ¶
func NewRemotePluginExecutor(logger *slog.Logger) *RemotePluginExecutor
NewRemotePluginExecutor creates a new RemotePluginExecutor
func (*RemotePluginExecutor) Execute ¶
func (e *RemotePluginExecutor) Execute(ctx context.Context, plugin Info, request *pluginpb.CodeGeneratorRequest) (*pluginpb.CodeGeneratorResponse, error)
Execute executes a remote plugin via gRPC
func (*RemotePluginExecutor) GetName ¶ added in v0.9.0
func (e *RemotePluginExecutor) GetName() string