Documentation
¶
Index ¶
- type BuiltinCoderPlugin
- func (p *BuiltinCoderPlugin) Description() string
- func (p *BuiltinCoderPlugin) Execute(ctx context.Context, args []string) (string, error)
- func (p *BuiltinCoderPlugin) ExecuteWithStream(ctx context.Context, args []string, onOutput func(string)) (string, error)
- func (p *BuiltinCoderPlugin) Name() string
- func (p *BuiltinCoderPlugin) Path() string
- func (p *BuiltinCoderPlugin) Schema() string
- func (p *BuiltinCoderPlugin) Usage() string
- func (p *BuiltinCoderPlugin) Version() string
- type ExecutablePlugin
- func (p *ExecutablePlugin) Description() string
- func (p *ExecutablePlugin) Execute(ctx context.Context, args []string) (string, error)
- func (p *ExecutablePlugin) ExecuteWithStream(ctx context.Context, args []string, onOutput func(string)) (string, error)
- func (p *ExecutablePlugin) Name() string
- func (p *ExecutablePlugin) Path() string
- func (p *ExecutablePlugin) Schema() string
- func (p *ExecutablePlugin) Usage() string
- func (p *ExecutablePlugin) Version() string
- type Manager
- func (m *Manager) ClearRemotePlugins()
- func (m *Manager) Close()
- func (m *Manager) GetPlugin(name string) (Plugin, bool)
- func (m *Manager) GetPlugins() []Plugin
- func (m *Manager) PluginsDir() string
- func (m *Manager) RegisterBuiltinPlugin(plugin Plugin)
- func (m *Manager) RegisterRemotePlugin(plugin Plugin)
- func (m *Manager) Reload()
- type Metadata
- type Plugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuiltinCoderPlugin ¶ added in v1.60.0
type BuiltinCoderPlugin struct {
// contains filtered or unexported fields
}
BuiltinCoderPlugin adapts the engine package to the Plugin interface, providing @coder functionality without requiring an external binary.
func NewBuiltinCoderPlugin ¶ added in v1.60.0
func NewBuiltinCoderPlugin() *BuiltinCoderPlugin
NewBuiltinCoderPlugin creates a builtin @coder plugin backed by the engine package.
func (*BuiltinCoderPlugin) Description ¶ added in v1.60.0
func (p *BuiltinCoderPlugin) Description() string
func (*BuiltinCoderPlugin) Execute ¶ added in v1.60.0
Execute runs without streaming — collects all output and returns.
func (*BuiltinCoderPlugin) ExecuteWithStream ¶ added in v1.60.0
func (p *BuiltinCoderPlugin) ExecuteWithStream(ctx context.Context, args []string, onOutput func(string)) (string, error)
ExecuteWithStream runs the engine and streams output line-by-line via onOutput.
func (*BuiltinCoderPlugin) Name ¶ added in v1.60.0
func (p *BuiltinCoderPlugin) Name() string
func (*BuiltinCoderPlugin) Path ¶ added in v1.60.0
func (p *BuiltinCoderPlugin) Path() string
func (*BuiltinCoderPlugin) Schema ¶ added in v1.60.0
func (p *BuiltinCoderPlugin) Schema() string
func (*BuiltinCoderPlugin) Usage ¶ added in v1.60.0
func (p *BuiltinCoderPlugin) Usage() string
func (*BuiltinCoderPlugin) Version ¶ added in v1.60.0
func (p *BuiltinCoderPlugin) Version() string
type ExecutablePlugin ¶
type ExecutablePlugin struct {
// contains filtered or unexported fields
}
func (*ExecutablePlugin) Description ¶
func (p *ExecutablePlugin) Description() string
func (*ExecutablePlugin) ExecuteWithStream ¶ added in v1.47.8
func (p *ExecutablePlugin) ExecuteWithStream(ctx context.Context, args []string, onOutput func(string)) (string, error)
ExecuteWithStream é a implementação real com callback
func (*ExecutablePlugin) Name ¶
func (p *ExecutablePlugin) Name() string
func (*ExecutablePlugin) Path ¶
func (p *ExecutablePlugin) Path() string
func (*ExecutablePlugin) Schema ¶ added in v1.38.6
func (p *ExecutablePlugin) Schema() string
func (*ExecutablePlugin) Usage ¶
func (p *ExecutablePlugin) Usage() string
func (*ExecutablePlugin) Version ¶
func (p *ExecutablePlugin) Version() string
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager descobre, carrega e gerencia o ciclo de vida dos plugins.
func (*Manager) ClearRemotePlugins ¶ added in v1.60.0
func (m *Manager) ClearRemotePlugins()
ClearRemotePlugins removes all remote plugins (identified by Path() == "[remote]").
func (*Manager) Close ¶
func (m *Manager) Close()
Close encerra o watcher de arquivos de forma segura.
func (*Manager) GetPlugins ¶
func (*Manager) PluginsDir ¶
PluginsDir retorna o diretório onde os plugins estão instalados.
func (*Manager) RegisterBuiltinPlugin ¶ added in v1.60.0
RegisterBuiltinPlugin registers a builtin plugin. It is stored in a separate map so that Reload() can re-inject it when no external override exists.
func (*Manager) RegisterRemotePlugin ¶ added in v1.60.0
RegisterRemotePlugin registers a remote plugin in the manager without saving to disk. This allows remote plugins to be discoverable via GetPlugin/GetPlugins.
type Plugin ¶
type Plugin interface {
Name() string
Description() string
Usage() string
Version() string
Path() string
Schema() string
Execute(ctx context.Context, args []string) (string, error)
ExecuteWithStream(ctx context.Context, args []string, onOutput func(string)) (string, error)
}