Documentation
¶
Index ¶
- Constants
- func SearchPackages(pkgs []string, version string) (string, []string)
- type AptManager
- func (a *AptManager) CheckVersion(pkgs []packagemanagercommon.Package) (string, []string)
- func (a *AptManager) Configure(options ...packagemanagercommon.PackageManagerOption)
- func (a *AptManager) Install(pkgs []packagemanagercommon.Package, args []string) (string, []string)
- func (a *AptManager) ParseRemotePackageManagerVersionOutput(output string) ([]packagemanagercommon.Package, error)
- func (a *AptManager) Remove(pkgs []packagemanagercommon.Package, args []string) (string, []string)
- func (a *AptManager) SetAuthCommand(authCommand string)
- func (a *AptManager) SetUseAuth(useAuth bool)
- func (a *AptManager) Upgrade(pkgs []packagemanagercommon.Package) (string, []string)
- func (a *AptManager) UpgradeAll() (string, []string)
Constants ¶
View Source
const DefaultAuthCommand = "sudo"
DefaultAuthCommand is the default command used for authentication.
View Source
const DefaultPackageCommand = "apt-get"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AptManager ¶
type AptManager struct {
Parser packagemanagercommon.PackageParser
// contains filtered or unexported fields
}
AptManager implements PackageManager for systems using APT.
func NewAptManager ¶
func NewAptManager() *AptManager
NewAptManager creates a new AptManager with default settings.
func (*AptManager) CheckVersion ¶ added in v0.7.0
func (a *AptManager) CheckVersion(pkgs []packagemanagercommon.Package) (string, []string)
func (*AptManager) Configure ¶
func (a *AptManager) Configure(options ...packagemanagercommon.PackageManagerOption)
Configure applies functional options to customize the package manager.
func (*AptManager) Install ¶
func (a *AptManager) Install(pkgs []packagemanagercommon.Package, args []string) (string, []string)
Install returns the command and arguments for installing a package.
func (*AptManager) ParseRemotePackageManagerVersionOutput ¶ added in v0.11.0
func (a *AptManager) ParseRemotePackageManagerVersionOutput(output string) ([]packagemanagercommon.Package, error)
Parse parses the apt-cache policy output to extract Installed and Candidate versions.
func (*AptManager) Remove ¶
func (a *AptManager) Remove(pkgs []packagemanagercommon.Package, args []string) (string, []string)
Remove returns the command and arguments for removing a package.
func (*AptManager) SetAuthCommand ¶
func (a *AptManager) SetAuthCommand(authCommand string)
SetAuthCommand sets the authentication command.
func (*AptManager) SetUseAuth ¶
func (a *AptManager) SetUseAuth(useAuth bool)
SetUseAuth enables or disables authentication.
func (*AptManager) Upgrade ¶
func (a *AptManager) Upgrade(pkgs []packagemanagercommon.Package) (string, []string)
func (*AptManager) UpgradeAll ¶
func (a *AptManager) UpgradeAll() (string, []string)
UpgradeAll returns the command and arguments for upgrading all packages.
Click to show internal directories.
Click to hide internal directories.