16 lines
527 B
Go
16 lines
527 B
Go
package pkg
|
|
|
|
// PackageManager is the common interface for all package-manager drivers (e.g. `dpkg` for debian-based, `pacman` for arch)
|
|
type PackageManager interface {
|
|
// Name of executable (to check if installed and for debug)
|
|
Name() string
|
|
// Fetch updates the package cache/databse
|
|
Fetch() error
|
|
// Upgrade already installed packages and whatever can be upgraded with warranty (e.g. kernel)
|
|
Upgrade() error
|
|
// Install a given package
|
|
Install(string) error
|
|
// Remove a package given package
|
|
Remove(string) error
|
|
}
|