packagemanager

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallOrUpdate

func InstallOrUpdate(pkg string) error

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.

Directories

Path Synopsis
Package fake is a generated GoMock package.
Package fake is a generated GoMock package.
fake
Package fake is a generated GoMock package.
Package fake is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL