Documentation
¶
Index ¶
- type Store
- func (s *Store) FilterPlugins(category, search string, tags []string) []StorePlugin
- func (s *Store) GetCategories() []string
- func (s *Store) GetPlugin(name string) *StorePlugin
- func (s *Store) GetPlugins() []StorePlugin
- func (s *Store) GetPluginsPreferredForPlatform(osName, arch string) []StorePlugin
- func (s *Store) GetTags() []string
- func (s *Store) LoadFromCache() error
- func (s *Store) Refresh() error
- func (s *Store) ResolvePlugin(name, osName, arch string) *StorePlugin
- func (s *Store) UpdateInstalledStatus(installedPlugins map[string]bool, enabledPlugins map[string]bool)
- type StorePlugin
- type StoreUI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store represents the plugin store
func (*Store) FilterPlugins ¶
func (s *Store) FilterPlugins(category, search string, tags []string) []StorePlugin
FilterPlugins filters plugins by category, tags, or search term
func (*Store) GetCategories ¶
GetCategories returns all available categories
func (*Store) GetPlugin ¶
func (s *Store) GetPlugin(name string) *StorePlugin
GetPlugin returns a specific plugin
func (*Store) GetPlugins ¶
func (s *Store) GetPlugins() []StorePlugin
GetPlugins returns all plugins
func (*Store) GetPluginsPreferredForPlatform ¶
func (s *Store) GetPluginsPreferredForPlatform(osName, arch string) []StorePlugin
GetPluginsPreferredForPlatform returns one preferred variant per plugin name, defaulting to the current runtime platform when multiple variants exist.
func (*Store) LoadFromCache ¶
LoadFromCache loads plugins from cache
func (*Store) ResolvePlugin ¶
func (s *Store) ResolvePlugin(name, osName, arch string) *StorePlugin
ResolvePlugin selects the best matching plugin variant by name and platform. If osName or arch are empty, the current runtime platform is used. Preference order: 1) Exact goos+goarch match 2) Exact goos match (any arch) 3) First entry with matching name
type StorePlugin ¶
type StorePlugin struct {
Name string `json:"name"`
Version string `json:"version"`
Description string `json:"description"`
Author string `json:"author"`
License string `json:"license"`
Repository string `json:"repository,omitempty"`
Homepage string `json:"homepage,omitempty"`
DownloadURL string `json:"download_url"`
Checksum string `json:"checksum,omitempty"`
Category string `json:"category"`
Tags []string `json:"tags"`
// Platform-specific distribution metadata (optional for backward compatibility)
GoOS string `json:"goos,omitempty"`
GoArch string `json:"goarch,omitempty"`
MinVersion string `json:"min_version,omitempty"`
Installed bool `json:"-"`
Enabled bool `json:"-"`
Commands []sdk.PluginCommand `json:"commands"`
}
StorePlugin represents a plugin in the store