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 Dependency ¶
type Dependency struct { Name string PackageName string Installed bool InstallCommand string Version string Optional bool External bool }
Dependency represents a system package that we require
type DependencyList ¶
type DependencyList []*Dependency
DependencyList is a list of Dependency instances
func Dependencies ¶
func Dependencies(p PackageManager) (DependencyList, error)
Dependencies scans the system for required dependencies Returns a list of dependencies 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 Dnf ¶
type Dnf struct {
// contains filtered or unexported fields
}
Dnf represents the Dnf manager
func (*Dnf) InstallCommand ¶
InstallCommand returns the package manager specific command to install a package
func (*Dnf) PackageAvailable ¶
PackageAvailable tests if the given package is available for installation
func (*Dnf) PackageInstalled ¶
PackageInstalled tests if the given package name is installed
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 NixPackageDetail ¶
type Nixpkgs ¶
type Nixpkgs struct {
// contains filtered or unexported fields
}
Nixpkgs represents the Nixpkgs manager
func (*Nixpkgs) InstallCommand ¶
InstallCommand returns the package manager specific command to install a package
func (*Nixpkgs) PackageAvailable ¶
PackageAvailable tests if the given package is available for installation
func (*Nixpkgs) PackageInstalled ¶
PackageInstalled tests if the given package name 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 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