Documentation
¶
Index ¶
- func CompareVersions(a, b string) int
- type Input
- type Manager
- func (m *Manager) Add(url string) error
- func (m *Manager) CheckUpdates()
- func (m *Manager) Discover() ([]Plugin, error)
- func (m *Manager) Execute(p Plugin, input Input, timeout time.Duration) (string, error)
- func (m *Manager) List(nativePlugins []NativePluginInfo)
- func (m *Manager) Remove(name string) error
- func (m *Manager) Update(target string) error
- type Metadata
- type NativePluginInfo
- type Plugin
- type PrismContext
- type SessionContext
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareVersions ¶
CompareVersions compares two semver strings Returns -1 if a < b, 0 if a == b, 1 if a > b
Types ¶
type Input ¶
type Input struct {
Prism PrismContext `json:"prism"`
Session SessionContext `json:"session"`
Config map[string]any `json:"config"`
Colors map[string]string `json:"colors"`
}
Input is the JSON structure sent to plugins via stdin
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles plugin discovery, execution, and management
func (*Manager) CheckUpdates ¶
func (m *Manager) CheckUpdates()
CheckUpdates checks all plugins for available updates
func (*Manager) List ¶
func (m *Manager) List(nativePlugins []NativePluginInfo)
List prints all installed plugins (native + community)
type Metadata ¶
type Metadata struct {
Name string `json:"name"`
Version string `json:"version"`
Description string `json:"description"`
Author string `json:"author"`
Source string `json:"source"`
UpdateURL string `json:"update_url"`
}
Metadata represents plugin header metadata parsed from @-prefixed comments
func ParseMetadata ¶
ParseMetadata extracts metadata from plugin header comments
type NativePluginInfo ¶
NativePluginInfo describes a built-in plugin for listing
type Plugin ¶
type Plugin struct {
Name string
Path string
Metadata Metadata
IsBinary bool // true for compiled binaries, false for scripts
}
Plugin represents a discovered plugin
Click to show internal directories.
Click to hide internal directories.