Documentation
¶
Index ¶
- func FetchFeedback(refresh bool) map[string]Feedback
- func IsFirstPartyRepo(repo string) bool
- type Feedback
- type GitClient
- type LockStore
- type LockedPlugin
- type LyricsProvider
- type Manager
- func (m *Manager) EnsureLockfile() error
- func (m *Manager) GetLockfilePath() string
- func (m *Manager) GetPluginsDir() string
- func (m *Manager) HasUpdates(pluginID string, plugin Plugin) (hasUpdates bool, diffURL string, err error)
- func (m *Manager) Install(plugin Plugin) error
- func (m *Manager) IsInstalled(plugin Plugin) (bool, error)
- func (m *Manager) ListInstalled() ([]string, error)
- func (m *Manager) LyricsProvider(pluginID string) (LyricsProvider, bool)
- func (m *Manager) RestoreFromLockfile(sourcePath string, prune bool) error
- func (m *Manager) SnapshotLockfile() (PluginLockfile, []string, error)
- func (m *Manager) Uninstall(plugin Plugin) error
- func (m *Manager) UninstallByIDOrName(idOrName string) error
- func (m *Manager) Update(plugin Plugin) error
- func (m *Manager) UpdateByIDOrName(idOrName string) error
- func (m *Manager) WeatherProvider(pluginID string) (WeatherProvider, bool)
- func (m *Manager) WriteCurrentLockfile(outputPath string) ([]string, error)
- type Plugin
- func FilterByCapability(capability string, plugins []Plugin) []Plugin
- func FilterByCategory(category string, plugins []Plugin) []Plugin
- func FilterByCompositor(compositor string, plugins []Plugin) []Plugin
- func FindByIDOrName(idOrName string, plugins []Plugin) *Plugin
- func FuzzySearch(query string, plugins []Plugin) []Plugin
- func SortByFirstParty(plugins []Plugin) []Plugin
- type PluginLockfile
- type Registry
- type WeatherProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchFeedback ¶
FetchFeedback retrieves community upvotes, moderator status and directory metadata (version, icon, permissions, dates) from the directory API, reusing the last answer for feedbackMaxAge unless refresh is set. Best-effort: a failed fetch returns the last answer, or nil when there is none.
func IsFirstPartyRepo ¶
Types ¶
type GitClient ¶
type GitClient interface {
PlainClone(path string, url string) error
Pull(path string) error
OriginURL(path string) (string, error)
HasUpdates(path string) (hasUpdates bool, localHash string, remoteHash string, err error)
CurrentRevision(path string) (string, error)
CheckoutRevision(path string, revision string) error
}
type LockStore ¶
type LockStore struct {
// contains filtered or unexported fields
}
func (*LockStore) Load ¶
func (s *LockStore) Load() (PluginLockfile, error)
func (*LockStore) Write ¶
func (s *LockStore) Write(lock PluginLockfile) error
type LockedPlugin ¶
type LyricsProvider ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) EnsureLockfile ¶
func (*Manager) GetLockfilePath ¶
func (*Manager) GetPluginsDir ¶
func (*Manager) HasUpdates ¶
func (*Manager) ListInstalled ¶
func (*Manager) LyricsProvider ¶
func (m *Manager) LyricsProvider(pluginID string) (LyricsProvider, bool)
LyricsProvider reads an installed plugin's lyrics block, with Command made absolute.
func (*Manager) RestoreFromLockfile ¶
func (*Manager) SnapshotLockfile ¶
func (m *Manager) SnapshotLockfile() (PluginLockfile, []string, error)
func (*Manager) UninstallByIDOrName ¶
func (*Manager) UpdateByIDOrName ¶
func (*Manager) WeatherProvider ¶
func (m *Manager) WeatherProvider(pluginID string) (WeatherProvider, bool)
WeatherProvider reads an installed plugin's weather block, with Command made absolute.
type Plugin ¶
type Plugin struct {
ID string `json:"id"`
Name string `json:"name"`
Capabilities []string `json:"capabilities"`
Category string `json:"category"`
Repo string `json:"repo"`
Path string `json:"path,omitempty"`
Author string `json:"author"`
Description string `json:"description"`
Dependencies []string `json:"dependencies,omitempty"`
Compositors []string `json:"compositors"`
Distro []string `json:"distro"`
Screenshot string `json:"screenshot,omitempty"`
RequiresDMS string `json:"requires_dms,omitempty"`
Featured bool `json:"featured,omitempty"`
}
func FilterByCapability ¶
func FilterByCategory ¶
func FilterByCompositor ¶
func FindByIDOrName ¶
func FuzzySearch ¶
func SortByFirstParty ¶
type PluginLockfile ¶
type PluginLockfile struct {
LockfileVersion int `json:"lockfileVersion"`
Plugins map[string]LockedPlugin `json:"plugins"`
}
func NewPluginLockfile ¶
func NewPluginLockfile() PluginLockfile
func ParsePluginLockfile ¶
func ParsePluginLockfile(data []byte) (PluginLockfile, error)
func (PluginLockfile) Clone ¶
func (lock PluginLockfile) Clone() PluginLockfile
func (PluginLockfile) IDs ¶
func (lock PluginLockfile) IDs() []string
func (*PluginLockfile) SetRepositoryCommit ¶
func (lock *PluginLockfile) SetRepositoryCommit(repo, commit string)
func (PluginLockfile) Validate ¶
func (lock PluginLockfile) Validate() error
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}