Documentation
¶
Index ¶
- type ExecutablePlugin
- func (p *ExecutablePlugin) Description() string
- func (p *ExecutablePlugin) Execute(ctx context.Context, args []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
}
ExecutablePlugin é a implementação concreta para binários externos.
func (*ExecutablePlugin) Description ¶
func (p *ExecutablePlugin) Description() string
func (*ExecutablePlugin) Execute ¶
Execute invoca o binário do plugin, captura sua saída e trata erros.
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 Metadata ¶
type Metadata struct {
Name string `json:"name"`
Description string `json:"description"`
Usage string `json:"usage"`
Version string `json:"version"`
}
Metadata é a estrutura de descoberta que todo plugin DEVE fornecer via --metadata.
type Plugin ¶
type Plugin interface {
Name() string
Description() string
Usage() string
Version() string
Path() string // Expõe o caminho do executável para inspeção.
Schema() string
Execute(ctx context.Context, args []string) (string, error)
}
Plugin define a interface para qualquer plugin executável pelo ChatCLI.
func NewPluginFromPath ¶
NewPluginFromPath valida um arquivo executável e o carrega como um plugin.
Click to show internal directories.
Click to hide internal directories.