Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppVersion ¶
AppVersion returns the version for application related to the given package
Types ¶
type Apt ¶
type Apt struct {
// contains filtered or unexported fields
}
Apt represents the Apt manager
func (*Apt) InstallCommand ¶
InstallCommand returns the package manager specific command to install a package
func (*Apt) PackageAvailable ¶
PackageAvailable tests if the given package is available for installation
func (*Apt) PackageInstalled ¶
PackageInstalled tests if the given package name is installed
type Dependancy ¶
type Dependancy struct { Name string PackageName string Installed bool InstallCommand string Version string Optional bool External bool }
Dependancy represents a system package that we require
type DependencyList ¶
type DependencyList []*Dependancy
DependencyList is a list of Dependency instances
func Dependancies ¶
func Dependancies(p PackageManager) (DependencyList, error)
Dependancies scans the system for required dependancies Returns a list of dependancies search for, whether they were found and whether they were installed
func (DependencyList) InstallAllOptionalCommand ¶
func (d DependencyList) InstallAllOptionalCommand() string
InstallAllOptionalCommand returns the command you need to use to install all optional dependencies
func (DependencyList) InstallAllRequiredCommand ¶
func (d DependencyList) InstallAllRequiredCommand() string
InstallAllRequiredCommand returns the command you need to use to install all required dependencies
type Emerge ¶
type Emerge struct {
// contains filtered or unexported fields
}
Emerge represents the Emerge package manager
func (*Emerge) InstallCommand ¶
InstallCommand returns the package manager specific command to install a package
func (*Emerge) PackageAvailable ¶
PackageAvailable tests if the given package is available for installation
func (*Emerge) PackageInstalled ¶
PackageInstalled tests if the given package name is installed
type Eopkg ¶
type Eopkg struct {
// contains filtered or unexported fields
}
Eopkg represents the Eopkg manager
func (*Eopkg) InstallCommand ¶
InstallCommand returns the package manager specific command to install a package
func (*Eopkg) PackageAvailable ¶
PackageAvailable tests if the given package is available for installation
func (*Eopkg) PackageInstalled ¶
PackageInstalled tests if the given package is installed
type Package ¶
type Package struct { Name string Version string InstallCommand map[string]string SystemPackage bool Library bool Optional bool }
Package contains information about a system package
type PackageManager ¶
type PackageManager interface { Name() string Packages() packagemap PackageInstalled(*Package) (bool, error) PackageAvailable(*Package) (bool, error) InstallCommand(*Package) string }
PackageManager is a common interface across all package managers
func Find ¶
func Find(osid string) PackageManager
Find will attempt to find the system package manager
type Pacman ¶
type Pacman struct {
// contains filtered or unexported fields
}
Pacman represents the Pacman package manager
func (*Pacman) InstallCommand ¶
InstallCommand returns the package manager specific command to install a package
func (*Pacman) PackageAvailable ¶
PackageAvailable tests if the given package is available for installation
func (*Pacman) PackageInstalled ¶
PackageInstalled tests if the given package name is installed
type Yum ¶
type Yum struct {
// contains filtered or unexported fields
}
Yum represents the Yum manager
func (*Yum) InstallCommand ¶
InstallCommand returns the package manager specific command to install a package
func (*Yum) PackageAvailable ¶
PackageAvailable tests if the given package is available for installation
func (*Yum) PackageInstalled ¶
PackageInstalled tests if the given package name is installed
type Zypper ¶
type Zypper struct {
// contains filtered or unexported fields
}
Zypper represents the Zypper package manager
func (*Zypper) InstallCommand ¶
InstallCommand returns the package manager specific command to install a package
func (*Zypper) PackageAvailable ¶
PackageAvailable tests if the given package is available for installation
func (*Zypper) PackageInstalled ¶
PackageInstalled tests if the given package name is installed