plugin

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBuiltinPlugin added in v0.9.0

func IsBuiltinPlugin(pluginName string) bool

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

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

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 Info

type Info struct {
	Source  string
	Command []string
	Options map[string]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

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

Execute executes a remote plugin via gRPC

func (*RemotePluginExecutor) GetName added in v0.9.0

func (e *RemotePluginExecutor) GetName() string

Jump to

Keyboard shortcuts

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