Documentation
¶
Overview ¶
Package reg provides the v4 multi-registry plugin manager. Supports online fetch with offline cache fallback.
Index ¶
- type InstalledPlugin
- type LockEntry
- type Manager
- func (m *Manager) ClearCache()
- func (m *Manager) Install(ctx context.Context, name string) (*InstalledPlugin, error)
- func (m *Manager) ListInstalled() []*InstalledPlugin
- func (m *Manager) Lock() map[string]LockEntry
- func (m *Manager) Remove(name string) error
- func (m *Manager) Search(ctx context.Context, query string) ([]PluginMeta, error)
- type PluginMeta
- type Source
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InstalledPlugin ¶
type InstalledPlugin struct {
Name string `json:"name"`
Version string `json:"version"`
Source string `json:"source"`
Path string `json:"path"`
Checksum string `json:"checksum"`
Installed string `json:"installed"`
Running bool `json:"running"`
}
InstalledPlugin tracks a locally installed plugin.
type LockEntry ¶
type LockEntry struct {
Version string `json:"version"`
Source string `json:"source"`
Checksum string `json:"checksum"`
}
LockEntry pins one plugin version.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages plugin discovery, installation, and versioning.
func NewManager ¶
NewManager creates a plugin manager.
func (*Manager) ClearCache ¶
func (m *Manager) ClearCache()
ClearCache purges the offline cache (forces fresh fetch next time).
func (*Manager) ListInstalled ¶
func (m *Manager) ListInstalled() []*InstalledPlugin
ListInstalled returns all locally installed plugins.
type PluginMeta ¶
type PluginMeta struct {
Name string `json:"name"`
Description string `json:"description"`
Version string `json:"version"`
URL string `json:"url"`
Checksum string `json:"checksum"`
Homepage string `json:"homepage"`
Tags []string `json:"tags"`
MinOKVersion string `json:"min_ok_version"`
License string `json:"license"`
Author string `json:"author"`
SignedBy string `json:"signed_by,omitempty"`
}
PluginMeta describes one available plugin.
Click to show internal directories.
Click to hide internal directories.