Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InstallOrUpdate ¶
InstallOrUpdate either installs or update the given package. Depending on if the package is already installed or not.
func RegisterManager ¶
func RegisterManager(manager osSpecific, priority int)
RegisterManager registers all package managers which can be possible on the current operating system.
func SelfInstalledUsingPackageManager ¶
func SelfInstalledUsingPackageManager() bool
SelfInstalledUsingPackageManager checks if the minikube-support tools were installed using the same PackageManager returned by GetPackageManager().
func SetOsPackageManager ¶
func SetOsPackageManager(manager PackageManager)
SetOsPackageManager sets the os specific package manager. It is mainly for testing purposes.
Types ¶
type PackageManager ¶
type PackageManager interface {
// Get the name of the package osPackageManager
fmt.Stringer
// Installs the given package with this package osPackageManager
Install(pkg string) error
// IsInstalled checks if the given package is already installed.
IsInstalled(pkg string) (bool, error)
// Updates the given package with this package osPackageManager
Update(pkg string) error
// Uninstalls the given package with this package osPackageManager
Uninstall(pkg string) error
}
PackageManager is a simple abstraction about the different package managers for the different operating systems. For example on macOS we use brew to mange local 3rd party tools.
func GetPackageManager ¶
func GetPackageManager() PackageManager
GetPackageManager returns the os specific package osPackageManager.