Documentation
¶
Index ¶
- Constants
- type YumManager
- func (y *YumManager) CheckVersion(pkg, version string) (string, []string)
- func (y *YumManager) Configure(options ...pkgcommon.PackageManagerOption)
- func (y *YumManager) Install(pkg, version string, args []string) (string, []string)
- func (y YumManager) Parse(output string) (*pkgcommon.PackageVersion, error)
- func (y *YumManager) Remove(pkg string, args []string) (string, []string)
- func (y *YumManager) SetAuthCommand(authCommand string)
- func (y *YumManager) SetUseAuth(useAuth bool)
- func (y *YumManager) Upgrade(pkg, version string) (string, []string)
- func (y *YumManager) UpgradeAll() (string, []string)
Constants ¶
const DefaultAuthCommand = "sudo"
DefaultAuthCommand is the default command used for authentication.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type YumManager ¶
type YumManager struct {
// contains filtered or unexported fields
}
YumManager implements PackageManager for systems using YUM.
func NewYumManager ¶
func NewYumManager() *YumManager
NewYumManager creates a new YumManager with default settings.
func (*YumManager) CheckVersion ¶ added in v0.7.0
func (y *YumManager) CheckVersion(pkg, version string) (string, []string)
CheckVersion returns the command and arguments for checking the info of a specific package.
func (*YumManager) Configure ¶
func (y *YumManager) Configure(options ...pkgcommon.PackageManagerOption)
Configure applies functional options to customize the package manager.
func (*YumManager) Install ¶
func (y *YumManager) Install(pkg, version string, args []string) (string, []string)
Install returns the command and arguments for installing a package.
func (YumManager) Parse ¶ added in v0.7.0
func (y YumManager) Parse(output string) (*pkgcommon.PackageVersion, error)
Parse parses the dnf info output to extract Installed and Candidate versions.
func (*YumManager) Remove ¶
func (y *YumManager) Remove(pkg string, args []string) (string, []string)
Remove returns the command and arguments for removing a package.
func (*YumManager) SetAuthCommand ¶
func (y *YumManager) SetAuthCommand(authCommand string)
SetAuthCommand sets the authentication command.
func (*YumManager) SetUseAuth ¶
func (y *YumManager) SetUseAuth(useAuth bool)
SetUseAuth enables or disables authentication.
func (*YumManager) Upgrade ¶
func (y *YumManager) Upgrade(pkg, version string) (string, []string)
Upgrade returns the command and arguments for upgrading a specific package.
func (*YumManager) UpgradeAll ¶
func (y *YumManager) UpgradeAll() (string, []string)
UpgradeAll returns the command and arguments for upgrading all packages.