create common package-manager interface
This commit is contained in:
parent
8283b2ff04
commit
1c2cdaf641
|
@ -0,0 +1,13 @@
|
||||||
|
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
|
||||||
|
}
|
Loading…
Reference in New Issue