Documentation
¶
Index ¶
- Variables
- func FetchDependencies(mgrs []Manager, pkgs []model.Package, cache *DepsCache) map[string][]string
- func FetchDescriptions(mgrs []Manager, pkgs []model.Package, cache *DescriptionCache) map[string]string
- func FetchUpdates(mgrs []Manager, pkgs []model.Package, cache *UpdateCache) map[string]string
- func FormatBytes(b int64) string
- func LoadScanCache() []model.Package
- func ParseSizeString(s string) int64
- func QueryDetail(name string) (model.Package, error)
- func SanitizeDesc(s string) string
- func SaveScanCache(pkgs []model.Package)
- func ScanCacheAge() time.Duration
- func SplitApkNameVersion(s string) (string, string)
- func SplitPkgsrcNameVersion(s string) (string, string)
- func SplitXbpsNameVersion(s string) (string, string)
- type AUR
- func (a *AUR) Available() bool
- func (a *AUR) CheckUpdates(pkgs []model.Package) map[string]string
- func (a *AUR) Describe(pkgs []model.Package) map[string]string
- func (a *AUR) ListDependencies(pkgs []model.Package) map[string][]string
- func (a *AUR) Name() model.Source
- func (a *AUR) RemoveCmd(name string) *exec.Cmd
- func (a *AUR) Scan() ([]model.Package, error)
- type Apk
- func (a *Apk) Available() bool
- func (a *Apk) CheckUpdates(pkgs []model.Package) map[string]string
- func (a *Apk) Describe(pkgs []model.Package) map[string]string
- func (a *Apk) ListDependencies(pkgs []model.Package) map[string][]string
- func (a *Apk) Name() model.Source
- func (a *Apk) RemoveCmd(name string) *exec.Cmd
- func (a *Apk) Scan() ([]model.Package, error)
- func (a *Apk) UpgradeCmd(name string) *exec.Cmd
- type Apt
- func (a *Apt) Available() bool
- func (a *Apt) CheckUpdates(pkgs []model.Package) map[string]string
- func (a *Apt) Describe(pkgs []model.Package) map[string]string
- func (a *Apt) InstallCmd(name string) *exec.Cmd
- func (a *Apt) ListDependencies(pkgs []model.Package) map[string][]string
- func (a *Apt) Name() model.Source
- func (a *Apt) RemoveCmd(name string) *exec.Cmd
- func (a *Apt) RemoveCmdWithDeps(name string) *exec.Cmd
- func (a *Apt) Scan() ([]model.Package, error)
- func (a *Apt) Search(query string) ([]model.Package, error)
- func (a *Apt) UpgradeCmd(name string) *exec.Cmd
- type Brew
- func (b *Brew) Available() bool
- func (b *Brew) CheckUpdates(pkgs []model.Package) map[string]string
- func (b *Brew) Describe(pkgs []model.Package) map[string]string
- func (b *Brew) InstallCmd(name string) *exec.Cmd
- func (b *Brew) ListDependencies(pkgs []model.Package) map[string][]string
- func (b *Brew) Name() model.Source
- func (b *Brew) RemoveCmd(name string) *exec.Cmd
- func (b *Brew) Scan() ([]model.Package, error)
- func (b *Brew) Search(query string) ([]model.Package, error)
- func (b *Brew) UpgradeCmd(name string) *exec.Cmd
- type Bun
- type Cargo
- type Chocolatey
- func (c *Chocolatey) Available() bool
- func (c *Chocolatey) CheckUpdates(_ []model.Package) map[string]string
- func (c *Chocolatey) Describe(pkgs []model.Package) map[string]string
- func (c *Chocolatey) InstallCmd(name string) *exec.Cmd
- func (c *Chocolatey) Name() model.Source
- func (c *Chocolatey) RemoveCmd(name string) *exec.Cmd
- func (c *Chocolatey) Scan() ([]model.Package, error)
- func (c *Chocolatey) Search(query string) ([]model.Package, error)
- func (c *Chocolatey) UpgradeCmd(name string) *exec.Cmd
- type Composer
- func (c *Composer) Available() bool
- func (c *Composer) CheckUpdates(pkgs []model.Package) map[string]string
- func (c *Composer) Describe(pkgs []model.Package) map[string]string
- func (c *Composer) ListDependencies(pkgs []model.Package) map[string][]string
- func (c *Composer) Name() model.Source
- func (c *Composer) RemoveCmd(name string) *exec.Cmd
- func (c *Composer) Scan() ([]model.Package, error)
- type Conda
- func (c *Conda) Available() bool
- func (c *Conda) CheckUpdates(pkgs []model.Package) map[string]string
- func (c *Conda) Describe(pkgs []model.Package) map[string]string
- func (c *Conda) ListDependencies(pkgs []model.Package) map[string][]string
- func (c *Conda) Name() model.Source
- func (c *Conda) RemoveCmd(name string) *exec.Cmd
- func (c *Conda) Scan() ([]model.Package, error)
- func (c *Conda) UpgradeCmd(name string) *exec.Cmd
- type DeepRemover
- type DependencyLister
- type DepsCache
- type Describer
- type DescriptionCache
- type Dnf
- func (d *Dnf) Available() bool
- func (d *Dnf) CheckUpdates(pkgs []model.Package) map[string]string
- func (d *Dnf) Describe(pkgs []model.Package) map[string]string
- func (d *Dnf) InstallCmd(name string) *exec.Cmd
- func (d *Dnf) ListDependencies(pkgs []model.Package) map[string][]string
- func (d *Dnf) Name() model.Source
- func (d *Dnf) RemoveCmd(name string) *exec.Cmd
- func (d *Dnf) RemoveCmdWithDeps(name string) *exec.Cmd
- func (d *Dnf) Scan() ([]model.Package, error)
- func (d *Dnf) Search(query string) ([]model.Package, error)
- func (d *Dnf) UpgradeCmd(name string) *exec.Cmd
- type Flatpak
- func (f *Flatpak) Available() bool
- func (f *Flatpak) CheckUpdates(pkgs []model.Package) map[string]string
- func (f *Flatpak) Describe(pkgs []model.Package) map[string]string
- func (f *Flatpak) InstallCmd(name string) *exec.Cmd
- func (f *Flatpak) ListDependencies(pkgs []model.Package) map[string][]string
- func (f *Flatpak) Name() model.Source
- func (f *Flatpak) RemoveCmd(name string) *exec.Cmd
- func (f *Flatpak) Scan() ([]model.Package, error)
- func (f *Flatpak) Search(query string) ([]model.Package, error)
- func (f *Flatpak) UpgradeCmd(name string) *exec.Cmd
- type FreeBSDPkg
- func (f *FreeBSDPkg) Available() bool
- func (f *FreeBSDPkg) CheckUpdates(pkgs []model.Package) map[string]string
- func (f *FreeBSDPkg) Describe(pkgs []model.Package) map[string]string
- func (f *FreeBSDPkg) ListDependencies(pkgs []model.Package) map[string][]string
- func (f *FreeBSDPkg) Name() model.Source
- func (f *FreeBSDPkg) RemoveCmd(name string) *exec.Cmd
- func (f *FreeBSDPkg) Scan() ([]model.Package, error)
- type Gem
- func (g *Gem) Available() bool
- func (g *Gem) CheckUpdates(pkgs []model.Package) map[string]string
- func (g *Gem) Describe(pkgs []model.Package) map[string]string
- func (g *Gem) ListDependencies(pkgs []model.Package) map[string][]string
- func (g *Gem) Name() model.Source
- func (g *Gem) RemoveCmd(name string) *exec.Cmd
- func (g *Gem) Scan() ([]model.Package, error)
- func (g *Gem) UpgradeCmd(name string) *exec.Cmd
- type Go
- type Guix
- func (g *Guix) Available() bool
- func (g *Guix) CheckUpdates(pkgs []model.Package) map[string]string
- func (g *Guix) Describe(pkgs []model.Package) map[string]string
- func (g *Guix) ListDependencies(pkgs []model.Package) map[string][]string
- func (g *Guix) Name() model.Source
- func (g *Guix) RemoveCmd(name string) *exec.Cmd
- func (g *Guix) Scan() ([]model.Package, error)
- type Installer
- type Luarocks
- func (l *Luarocks) Available() bool
- func (l *Luarocks) CheckUpdates(pkgs []model.Package) map[string]string
- func (l *Luarocks) Describe(pkgs []model.Package) map[string]string
- func (l *Luarocks) ListDependencies(pkgs []model.Package) map[string][]string
- func (l *Luarocks) Name() model.Source
- func (l *Luarocks) RemoveCmd(name string) *exec.Cmd
- func (l *Luarocks) Scan() ([]model.Package, error)
- func (l *Luarocks) UpgradeCmd(name string) *exec.Cmd
- type MacPorts
- func (m *MacPorts) Available() bool
- func (m *MacPorts) CheckUpdates(pkgs []model.Package) map[string]string
- func (m *MacPorts) Describe(pkgs []model.Package) map[string]string
- func (m *MacPorts) ListDependencies(pkgs []model.Package) map[string][]string
- func (m *MacPorts) Name() model.Source
- func (m *MacPorts) RemoveCmd(name string) *exec.Cmd
- func (m *MacPorts) Scan() ([]model.Package, error)
- type Manager
- type Mas
- type Nix
- type Npm
- func (n *Npm) Available() bool
- func (n *Npm) CheckUpdates(pkgs []model.Package) map[string]string
- func (n *Npm) Describe(pkgs []model.Package) map[string]string
- func (n *Npm) InstallCmd(name string) *exec.Cmd
- func (n *Npm) ListDependencies(pkgs []model.Package) map[string][]string
- func (n *Npm) Name() model.Source
- func (n *Npm) RemoveCmd(name string) *exec.Cmd
- func (n *Npm) Scan() ([]model.Package, error)
- func (n *Npm) Search(query string) ([]model.Package, error)
- func (n *Npm) UpgradeCmd(name string) *exec.Cmd
- type Nuget
- type Opam
- func (o *Opam) Available() bool
- func (o *Opam) CheckUpdates(pkgs []model.Package) map[string]string
- func (o *Opam) Describe(pkgs []model.Package) map[string]string
- func (o *Opam) ListDependencies(pkgs []model.Package) map[string][]string
- func (o *Opam) Name() model.Source
- func (o *Opam) RemoveCmd(name string) *exec.Cmd
- func (o *Opam) Scan() ([]model.Package, error)
- func (o *Opam) UpgradeCmd(name string) *exec.Cmd
- type Pacman
- func (p *Pacman) Available() bool
- func (p *Pacman) CheckUpdates(pkgs []model.Package) map[string]string
- func (p *Pacman) Describe(pkgs []model.Package) map[string]string
- func (p *Pacman) InstallCmd(name string) *exec.Cmd
- func (p *Pacman) ListDependencies(pkgs []model.Package) map[string][]string
- func (p *Pacman) Name() model.Source
- func (p *Pacman) RemoveCmd(name string) *exec.Cmd
- func (p *Pacman) RemoveCmdWithDeps(name string) *exec.Cmd
- func (p *Pacman) Scan() ([]model.Package, error)
- func (p *Pacman) Search(query string) ([]model.Package, error)
- func (p *Pacman) UpgradeCmd(name string) *exec.Cmd
- type Pip
- func (p *Pip) Available() bool
- func (p *Pip) CheckUpdates(pkgs []model.Package) map[string]string
- func (p *Pip) Describe(pkgs []model.Package) map[string]string
- func (p *Pip) InstallCmd(name string) *exec.Cmd
- func (p *Pip) ListDependencies(pkgs []model.Package) map[string][]string
- func (p *Pip) Name() model.Source
- func (p *Pip) RemoveCmd(name string) *exec.Cmd
- func (p *Pip) Scan() ([]model.Package, error)
- func (p *Pip) Search(query string) ([]model.Package, error)
- func (p *Pip) UpgradeCmd(name string) *exec.Cmd
- type Pipx
- type Pkgsrc
- func (p *Pkgsrc) Available() bool
- func (p *Pkgsrc) Describe(pkgs []model.Package) map[string]string
- func (p *Pkgsrc) ListDependencies(pkgs []model.Package) map[string][]string
- func (p *Pkgsrc) Name() model.Source
- func (p *Pkgsrc) RemoveCmd(name string) *exec.Cmd
- func (p *Pkgsrc) Scan() ([]model.Package, error)
- type Pnpm
- func (n *Pnpm) Available() bool
- func (n *Pnpm) CheckUpdates(pkgs []model.Package) map[string]string
- func (n *Pnpm) Describe(pkgs []model.Package) map[string]string
- func (n *Pnpm) ListDependencies(pkgs []model.Package) map[string][]string
- func (n *Pnpm) Name() model.Source
- func (n *Pnpm) RemoveCmd(name string) *exec.Cmd
- func (n *Pnpm) Scan() ([]model.Package, error)
- type Portage
- func (p *Portage) Available() bool
- func (p *Portage) CheckUpdates(pkgs []model.Package) map[string]string
- func (p *Portage) Describe(pkgs []model.Package) map[string]string
- func (p *Portage) ListDependencies(pkgs []model.Package) map[string][]string
- func (p *Portage) Name() model.Source
- func (p *Portage) RemoveCmd(name string) *exec.Cmd
- func (p *Portage) Scan() ([]model.Package, error)
- type PowerShell
- type Remover
- type Scoop
- func (s *Scoop) Available() bool
- func (s *Scoop) CheckUpdates(_ []model.Package) map[string]string
- func (s *Scoop) Describe(pkgs []model.Package) map[string]string
- func (s *Scoop) InstallCmd(name string) *exec.Cmd
- func (s *Scoop) Name() model.Source
- func (s *Scoop) RemoveCmd(name string) *exec.Cmd
- func (s *Scoop) Scan() ([]model.Package, error)
- func (s *Scoop) Search(query string) ([]model.Package, error)
- func (s *Scoop) UpgradeCmd(name string) *exec.Cmd
- type Searcher
- type Snap
- func (s *Snap) Available() bool
- func (s *Snap) CheckUpdates(pkgs []model.Package) map[string]string
- func (s *Snap) Describe(pkgs []model.Package) map[string]string
- func (s *Snap) InstallCmd(name string) *exec.Cmd
- func (s *Snap) ListDependencies(pkgs []model.Package) map[string][]string
- func (s *Snap) Name() model.Source
- func (s *Snap) RemoveCmd(name string) *exec.Cmd
- func (s *Snap) Scan() ([]model.Package, error)
- func (s *Snap) Search(query string) ([]model.Package, error)
- func (s *Snap) UpgradeCmd(name string) *exec.Cmd
- type UpdateCache
- type UpdateChecker
- type Upgrader
- type WindowsUpdates
- type Winget
- func (w *Winget) Available() bool
- func (w *Winget) CheckUpdates(_ []model.Package) map[string]string
- func (w *Winget) Describe(pkgs []model.Package) map[string]string
- func (w *Winget) InstallCmd(name string) *exec.Cmd
- func (w *Winget) Name() model.Source
- func (w *Winget) RemoveCmd(name string) *exec.Cmd
- func (w *Winget) Scan() ([]model.Package, error)
- func (w *Winget) Search(query string) ([]model.Package, error)
- func (w *Winget) UpgradeCmd(name string) *exec.Cmd
- type Xbps
- func (x *Xbps) Available() bool
- func (x *Xbps) CheckUpdates(pkgs []model.Package) map[string]string
- func (x *Xbps) Describe(pkgs []model.Package) map[string]string
- func (x *Xbps) ListDependencies(pkgs []model.Package) map[string][]string
- func (x *Xbps) Name() model.Source
- func (x *Xbps) RemoveCmd(name string) *exec.Cmd
- func (x *Xbps) RemoveCmdWithDeps(name string) *exec.Cmd
- func (x *Xbps) Scan() ([]model.Package, error)
- func (x *Xbps) UpgradeCmd(name string) *exec.Cmd
Constants ¶
This section is empty.
Variables ¶
var ErrUpgradeNotSupported = errors.New("this package manager does not support upgrading a single package")
ErrUpgradeNotSupported is returned when a manager cannot upgrade a single package.
Functions ¶
func FetchDependencies ¶ added in v0.2.0
FetchDependencies fetches dependency lists for all packages, using the cache where possible and falling back to the manager's DependencyLister interface.
func FetchDescriptions ¶
func FetchDescriptions(mgrs []Manager, pkgs []model.Package, cache *DescriptionCache) map[string]string
FetchDescriptions fetches descriptions for all packages, using the cache where possible and falling back to the manager's Describer interface.
func FetchUpdates ¶
FetchUpdates checks for available updates across all managers, using the cache. Returns a map of package key → latest version.
func FormatBytes ¶
FormatBytes returns a human-readable size string.
func LoadScanCache ¶
LoadScanCache returns cached packages if the cache exists and is fresh. Returns nil if stale or missing.
func ParseSizeString ¶
ParseSizeString converts a human-readable size like "1.5 MiB" or "234 KiB" into bytes. Returns 0 if parsing fails.
func QueryDetail ¶
QueryDetail fetches extended info for a single pacman package.
func SanitizeDesc ¶ added in v0.2.0
SanitizeDesc strips HTML tags and collapses whitespace from descriptions.
func SaveScanCache ¶
SaveScanCache writes the package list to the cache file.
func ScanCacheAge ¶
ScanCacheAge returns how old the cache is, or -1 if no cache.
func SplitApkNameVersion ¶ added in v0.2.0
SplitApkNameVersion splits "name-version-rN" by finding the version boundary. Alpine package names can contain hyphens, so we look for the last hyphen that is followed by a digit.
func SplitPkgsrcNameVersion ¶ added in v0.2.0
SplitPkgsrcNameVersion splits "name-version" by the last hyphen.
func SplitXbpsNameVersion ¶ added in v0.2.0
SplitXbpsNameVersion splits "name-version_revision" by the last hyphen before a digit.
Types ¶
type Apt ¶
type Apt struct{}
func (*Apt) ListDependencies ¶ added in v0.2.0
func (*Apt) RemoveCmdWithDeps ¶ added in v0.3.0
type Chocolatey ¶ added in v0.2.0
type Chocolatey struct{}
Chocolatey manages packages via the Chocolatey package manager for Windows.
func (*Chocolatey) Available ¶ added in v0.2.0
func (c *Chocolatey) Available() bool
func (*Chocolatey) CheckUpdates ¶ added in v0.2.0
func (c *Chocolatey) CheckUpdates(_ []model.Package) map[string]string
CheckUpdates runs `choco outdated` to find packages with available updates.
func (*Chocolatey) Describe ¶ added in v0.3.4
func (c *Chocolatey) Describe(pkgs []model.Package) map[string]string
func (*Chocolatey) InstallCmd ¶ added in v0.3.0
func (c *Chocolatey) InstallCmd(name string) *exec.Cmd
func (*Chocolatey) Name ¶ added in v0.2.0
func (c *Chocolatey) Name() model.Source
func (*Chocolatey) RemoveCmd ¶ added in v0.3.0
func (c *Chocolatey) RemoveCmd(name string) *exec.Cmd
func (*Chocolatey) Scan ¶ added in v0.2.0
func (c *Chocolatey) Scan() ([]model.Package, error)
Scan lists locally installed Chocolatey packages. Handles both Chocolatey v1 (requires --local-only flag) and v2+ (local by default).
func (*Chocolatey) Search ¶ added in v0.3.0
func (c *Chocolatey) Search(query string) ([]model.Package, error)
func (*Chocolatey) UpgradeCmd ¶ added in v0.2.13
func (c *Chocolatey) UpgradeCmd(name string) *exec.Cmd
type Composer ¶
type Composer struct{}
func (*Composer) CheckUpdates ¶
func (*Composer) ListDependencies ¶ added in v0.2.0
type Conda ¶
type Conda struct{}
func (*Conda) ListDependencies ¶ added in v0.2.0
type DeepRemover ¶ added in v0.3.0
DeepRemover is implemented by managers that can also remove a package along with its orphaned dependencies.
type DependencyLister ¶ added in v0.2.0
DependencyLister is implemented by managers that can fetch package dependencies.
type DepsCache ¶ added in v0.2.0
type DepsCache struct {
// contains filtered or unexported fields
}
DepsCache persists dependency lists to disk with a 24h TTL.
func NewDepsCache ¶ added in v0.2.0
func NewDepsCache() *DepsCache
func (*DepsCache) Flush ¶ added in v0.2.0
func (dc *DepsCache) Flush()
Flush writes the cache to disk.
type DescriptionCache ¶
type DescriptionCache struct {
// contains filtered or unexported fields
}
DescriptionCache persists descriptions to disk with a 24h TTL.
func NewDescriptionCache ¶
func NewDescriptionCache() *DescriptionCache
func (*DescriptionCache) Flush ¶
func (dc *DescriptionCache) Flush()
Flush writes the cache to disk.
func (*DescriptionCache) Get ¶
func (dc *DescriptionCache) Get(key string) (string, bool)
Get returns a cached description if it exists and hasn't expired.
func (*DescriptionCache) Set ¶
func (dc *DescriptionCache) Set(key, desc string)
Set stores a description in the cache.
type Dnf ¶
type Dnf struct{}
func (*Dnf) ListDependencies ¶ added in v0.2.0
func (*Dnf) RemoveCmdWithDeps ¶ added in v0.3.0
type Flatpak ¶
type Flatpak struct{}
func (*Flatpak) CheckUpdates ¶
func (*Flatpak) ListDependencies ¶ added in v0.2.0
type FreeBSDPkg ¶
type FreeBSDPkg struct{}
func (*FreeBSDPkg) Available ¶
func (f *FreeBSDPkg) Available() bool
func (*FreeBSDPkg) CheckUpdates ¶
func (f *FreeBSDPkg) CheckUpdates(pkgs []model.Package) map[string]string
func (*FreeBSDPkg) ListDependencies ¶ added in v0.2.0
func (f *FreeBSDPkg) ListDependencies(pkgs []model.Package) map[string][]string
func (*FreeBSDPkg) Name ¶
func (f *FreeBSDPkg) Name() model.Source
type Guix ¶ added in v0.2.0
type Guix struct{}
func (*Guix) CheckUpdates ¶ added in v0.2.0
func (*Guix) ListDependencies ¶ added in v0.2.0
type Installer ¶ added in v0.3.0
Installer is implemented by managers that can install a new package.
type Luarocks ¶
type Luarocks struct{}
func (*Luarocks) CheckUpdates ¶
func (*Luarocks) ListDependencies ¶ added in v0.2.0
type MacPorts ¶
type MacPorts struct{}
func (*MacPorts) CheckUpdates ¶
func (*MacPorts) ListDependencies ¶ added in v0.2.0
type Nuget ¶ added in v0.2.0
type Nuget struct{}
Nuget surfaces packages from the local NuGet global package cache (~/.nuget/packages). This is intentionally cross-platform: the cache exists wherever the .NET SDK is installed, including macOS and Linux. Do not add a runtime.GOOS == "windows" guard here.
type Pacman ¶
type Pacman struct{}
func (*Pacman) ListDependencies ¶ added in v0.2.0
func (*Pacman) RemoveCmdWithDeps ¶ added in v0.3.0
type Portage ¶ added in v0.2.0
type Portage struct{}
func (*Portage) CheckUpdates ¶ added in v0.2.0
func (*Portage) ListDependencies ¶ added in v0.2.0
type PowerShell ¶ added in v0.2.0
type PowerShell struct{}
PowerShell surfaces installed PowerShell modules via Get-Module -ListAvailable. Works with both Windows PowerShell (powershell.exe) and PowerShell Core (pwsh). pwsh runs on macOS and Linux too, so this manager is not Windows-only by design.
func (*PowerShell) Available ¶ added in v0.2.0
func (ps *PowerShell) Available() bool
func (*PowerShell) Describe ¶ added in v0.2.0
func (ps *PowerShell) Describe(pkgs []model.Package) map[string]string
Describe returns module descriptions, reusing cached Scan() data when available to avoid spawning a second PowerShell process.
func (*PowerShell) Name ¶ added in v0.2.0
func (ps *PowerShell) Name() model.Source
type Scoop ¶ added in v0.2.0
type Scoop struct{}
Scoop manages packages via the Scoop command-line installer for Windows.
func (*Scoop) CheckUpdates ¶ added in v0.2.0
CheckUpdates runs `scoop status` to find packages with available updates.
func (*Scoop) Scan ¶ added in v0.2.0
Scan lists all installed Scoop packages. Modern Scoop (2022+) renders a tabular format with a separator line; older versions print " name version [bucket]" per line — both are handled.
type Searcher ¶ added in v0.3.0
Searcher is implemented by managers that can search for available packages.
type UpdateCache ¶
type UpdateCache struct {
// contains filtered or unexported fields
}
UpdateCache persists update info to disk with a 7-day TTL.
func NewUpdateCache ¶
func NewUpdateCache() *UpdateCache
func (*UpdateCache) Flush ¶
func (uc *UpdateCache) Flush()
func (*UpdateCache) Invalidate ¶ added in v0.2.13
func (uc *UpdateCache) Invalidate(keys []string)
func (*UpdateCache) Set ¶
func (uc *UpdateCache) Set(key, latest string)
type UpdateChecker ¶
type UpdateChecker interface {
// CheckUpdates returns a map of package name → latest available version.
CheckUpdates(pkgs []model.Package) map[string]string
}
UpdateChecker is implemented by managers that can check for available updates.
type Upgrader ¶ added in v0.2.13
type Upgrader interface {
// UpgradeCmd returns the command to upgrade a single package.
// The caller is responsible for executing it (typically via tea.ExecProcess
// so the user sees output and can interact with prompts like sudo).
UpgradeCmd(name string) *exec.Cmd
}
Upgrader is implemented by managers that can upgrade a single package.
type WindowsUpdates ¶ added in v0.2.0
type WindowsUpdates struct{}
func (*WindowsUpdates) Available ¶ added in v0.2.0
func (w *WindowsUpdates) Available() bool
func (*WindowsUpdates) Name ¶ added in v0.2.0
func (w *WindowsUpdates) Name() model.Source
type Winget ¶ added in v0.2.0
type Winget struct{}
Winget manages packages via the Windows Package Manager (winget).
func (*Winget) CheckUpdates ¶ added in v0.2.0
CheckUpdates runs `winget upgrade` and returns available version per package name.
func (*Winget) Scan ¶ added in v0.2.0
Scan lists all installed packages. Tries JSON output first (winget 1.5+), then falls back to fixed-width text parsing.
type Xbps ¶ added in v0.2.0
type Xbps struct{}
func (*Xbps) CheckUpdates ¶ added in v0.2.0
func (*Xbps) ListDependencies ¶ added in v0.2.0
func (*Xbps) RemoveCmdWithDeps ¶ added in v0.3.0
Source Files
¶
- apk.go
- apt.go
- aur.go
- brew.go
- bun.go
- cargo.go
- chocolatey.go
- composer.go
- conda.go
- deps.go
- describe.go
- dnf.go
- flatpak.go
- freebsdpkg.go
- gem.go
- go.go
- guix.go
- installer.go
- luarocks.go
- macports.go
- manager.go
- mas.go
- nix.go
- npm.go
- nuget.go
- opam.go
- pacman.go
- pip.go
- pipx.go
- pkgsrc.go
- pnpm.go
- portage.go
- powershell.go
- privileged_unix.go
- remover.go
- scancache.go
- scoop.go
- searcher.go
- size.go
- snap.go
- updates.go
- upgrader.go
- windows_updates.go
- winget.go
- xbps.go