Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPluginsDir ¶
GetPluginsDir returns the plugins directory path
func IsPluginInstalled ¶
IsPluginInstalled checks if a plugin is installed
func RemovePlugin ¶
RemovePlugin removes an installed plugin
Types ¶
type Manifest ¶
type Manifest struct {
Metadata Metadata `yaml:"metadata"`
}
Manifest represents the plugin manifest file
func ListInstalledPlugins ¶
ListInstalledPlugins lists all installed plugins
func LoadManifest ¶
LoadManifest loads a plugin manifest from a file
type Metadata ¶
type Metadata struct {
Name string `yaml:"name"`
Version string `yaml:"version"`
Description string `yaml:"description"`
Author string `yaml:"author"`
Homepage string `yaml:"homepage,omitempty"`
License string `yaml:"license,omitempty"`
Tags []string `yaml:"tags,omitempty"`
ToolName string `yaml:"tool_name"` // The tool this plugin supports
ConfigPath string `yaml:"config_path,omitempty"` // Optional: single custom config path (default: auto-detected)
ConfigPaths []string `yaml:"config_paths,omitempty"` // Optional: multiple config paths
}
Metadata represents plugin metadata
type Plugin ¶
type Plugin interface {
// Name returns the plugin name
Name() string
// Version returns the plugin version
Version() string
// Description returns a short description
Description() string
// Initialize initializes the plugin
Initialize() error
// Snapshot creates a snapshot for this plugin's tool
Snapshot(destPath string) error
// Restore restores from a snapshot
Restore(sourcePath string) error
// Validate validates a snapshot
Validate(snapshotPath string) error
// IsInstalled checks if the tool is installed
IsInstalled() bool
// GetMetadata returns metadata about the current state
GetMetadata() (map[string]interface{}, error)
}
Plugin represents a plugin that extends envswitch functionality
Click to show internal directories.
Click to hide internal directories.