nix-amer/pkg/common.go

14 lines
447 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 {
// Fetch updates the package cache/databse
Fetch() bool
// Upgrade already installed packages and whatever can be upgraded with warranty (e.g. kernel)
Upgrade() bool
// Install a given package
Install(string) bool
// Remove a package given package
Remove(string) bool
}