Documentation
¶
Index ¶
- 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
- type Metadata
- type Plugin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) 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.
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)
}
func NewPluginFromPath ¶
Click to show internal directories.
Click to hide internal directories.