nix-amer/internal/pkg/common.go

18 lines
552 B
Go
Raw Normal View History

package pkg
var DefaultManager = ""
// 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
}