Documentation ¶
Index ¶
- Constants
- type AptPackageManager
- func (c *AptPackageManager) CheckModLoaded(module string) error
- func (c *AptPackageManager) CheckPackageInstalled(name string) (output string, err error)
- func (c *AptPackageManager) Execute(envs []string, binary string, args []string, timeout time.Duration) (string, error)
- func (c *AptPackageManager) GetServiceStatus(name string) (string, error)
- func (c *AptPackageManager) InstallPackage(name string) (string, error)
- func (c *AptPackageManager) Modprobe(module string) (string, error)
- func (c *AptPackageManager) StartService(name string) (string, error)
- func (c *AptPackageManager) UninstallPackage(name string) (string, error)
- func (c *AptPackageManager) UpdatePackageList() (string, error)
- type PackageManager
- type PackageManagerType
- type PacmanPackageManager
- func (c *PacmanPackageManager) CheckModLoaded(module string) error
- func (c *PacmanPackageManager) CheckPackageInstalled(name string) (string, error)
- func (c *PacmanPackageManager) Execute(envs []string, binary string, args []string, timeout time.Duration) (string, error)
- func (c *PacmanPackageManager) GetServiceStatus(name string) (string, error)
- func (c *PacmanPackageManager) InstallPackage(name string) (string, error)
- func (c *PacmanPackageManager) Modprobe(module string) (string, error)
- func (c *PacmanPackageManager) StartService(name string) (string, error)
- func (c *PacmanPackageManager) UninstallPackage(name string) (string, error)
- func (c *PacmanPackageManager) UpdatePackageList() (string, error)
- type TransactionalUpdatePackageManager
- func (c *TransactionalUpdatePackageManager) CheckModLoaded(module string) error
- func (c *TransactionalUpdatePackageManager) CheckPackageInstalled(name string) (string, error)
- func (c *TransactionalUpdatePackageManager) Execute(envs []string, binary string, args []string, timeout time.Duration) (string, error)
- func (c *TransactionalUpdatePackageManager) GetServiceStatus(name string) (string, error)
- func (c *TransactionalUpdatePackageManager) InstallPackage(name string) (string, error)
- func (c *TransactionalUpdatePackageManager) Modprobe(module string) (string, error)
- func (c *TransactionalUpdatePackageManager) StartService(name string) (string, error)
- func (c *TransactionalUpdatePackageManager) UninstallPackage(name string) (string, error)
- func (c *TransactionalUpdatePackageManager) UpdatePackageList() (string, error)
- type YumPackageManager
- func (c *YumPackageManager) CheckModLoaded(module string) error
- func (c *YumPackageManager) CheckPackageInstalled(name string) (string, error)
- func (c *YumPackageManager) Execute(envs []string, binary string, args []string, timeout time.Duration) (string, error)
- func (c *YumPackageManager) GetServiceStatus(name string) (string, error)
- func (c *YumPackageManager) InstallPackage(name string) (string, error)
- func (c *YumPackageManager) Modprobe(module string) (string, error)
- func (c *YumPackageManager) StartService(name string) (string, error)
- func (c *YumPackageManager) UninstallPackage(name string) (string, error)
- func (c *YumPackageManager) UpdatePackageList() (string, error)
- type ZypperPackageManager
- func (c *ZypperPackageManager) CheckModLoaded(module string) error
- func (c *ZypperPackageManager) CheckPackageInstalled(name string) (string, error)
- func (c *ZypperPackageManager) Execute(envs []string, binary string, args []string, timeout time.Duration) (string, error)
- func (c *ZypperPackageManager) GetServiceStatus(name string) (string, error)
- func (c *ZypperPackageManager) InstallPackage(name string) (string, error)
- func (c *ZypperPackageManager) Modprobe(module string) (string, error)
- func (c *ZypperPackageManager) StartService(name string) (string, error)
- func (c *ZypperPackageManager) UninstallPackage(name string) (string, error)
- func (c *ZypperPackageManager) UpdatePackageList() (string, error)
Constants ¶
const ( PackageManagerUnknown = PackageManagerType("") PackageManagerApt = PackageManagerType("apt") PackageManagerYum = PackageManagerType("yum") PackageManagerZypper = PackageManagerType("zypper") PackageManagerTransactionalUpdate = PackageManagerType("transactional-update") PackageManagerPacman = PackageManagerType("pacman") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AptPackageManager ¶
type AptPackageManager struct {
// contains filtered or unexported fields
}
func NewAptPackageManager ¶
func NewAptPackageManager(executor *commonns.Executor) *AptPackageManager
func (*AptPackageManager) CheckModLoaded ¶
func (c *AptPackageManager) CheckModLoaded(module string) error
CheckModLoaded checks if a module is loaded
func (*AptPackageManager) CheckPackageInstalled ¶
func (c *AptPackageManager) CheckPackageInstalled(name string) (output string, err error)
CheckPackageInstalled checks if a package is installed
func (*AptPackageManager) Execute ¶
func (c *AptPackageManager) Execute(envs []string, binary string, args []string, timeout time.Duration) (string, error)
Execute executes the given command with the specified environment variables, binary, and arguments.
func (*AptPackageManager) GetServiceStatus ¶
func (c *AptPackageManager) GetServiceStatus(name string) (string, error)
GetServiceStatus executes the service status command
func (*AptPackageManager) InstallPackage ¶
func (c *AptPackageManager) InstallPackage(name string) (string, error)
InstallPackage executes the installation command
func (*AptPackageManager) Modprobe ¶
func (c *AptPackageManager) Modprobe(module string) (string, error)
Modprobe executes the modprobe command
func (*AptPackageManager) StartService ¶
func (c *AptPackageManager) StartService(name string) (string, error)
StartService executes the service start command
func (*AptPackageManager) UninstallPackage ¶
func (c *AptPackageManager) UninstallPackage(name string) (string, error)
UninstallPackage executes the uninstallation command
func (*AptPackageManager) UpdatePackageList ¶
func (c *AptPackageManager) UpdatePackageList() (string, error)
UpdatePackageList updates list of available packages
type PackageManager ¶
type PackageManager interface { UpdatePackageList() (string, error) InstallPackage(name string) (string, error) UninstallPackage(name string) (string, error) Modprobe(module string) (string, error) CheckModLoaded(module string) error StartService(name string) (string, error) GetServiceStatus(name string) (string, error) CheckPackageInstalled(name string) (string, error) Execute(envs []string, binary string, args []string, timeout time.Duration) (string, error) }
func New ¶
func New(pkgMgrType PackageManagerType, executor *commonns.Executor) (PackageManager, error)
type PackageManagerType ¶
type PackageManagerType string
type PacmanPackageManager ¶
type PacmanPackageManager struct {
// contains filtered or unexported fields
}
func NewPacmanPackageManager ¶
func NewPacmanPackageManager(executor *commonns.Executor) *PacmanPackageManager
func (*PacmanPackageManager) CheckModLoaded ¶
func (c *PacmanPackageManager) CheckModLoaded(module string) error
CheckModLoaded checks if a module is loaded
func (*PacmanPackageManager) CheckPackageInstalled ¶
func (c *PacmanPackageManager) CheckPackageInstalled(name string) (string, error)
CheckPackageInstalled checks if a package is installed
func (*PacmanPackageManager) Execute ¶
func (c *PacmanPackageManager) Execute(envs []string, binary string, args []string, timeout time.Duration) (string, error)
Execute executes the given command with the specified environment variables, binary, and arguments.
func (*PacmanPackageManager) GetServiceStatus ¶
func (c *PacmanPackageManager) GetServiceStatus(name string) (string, error)
GetServiceStatus executes the service status command
func (*PacmanPackageManager) InstallPackage ¶
func (c *PacmanPackageManager) InstallPackage(name string) (string, error)
InstallPackage executes the installation command
func (*PacmanPackageManager) Modprobe ¶
func (c *PacmanPackageManager) Modprobe(module string) (string, error)
Modprobe executes the modprobe command
func (*PacmanPackageManager) StartService ¶
func (c *PacmanPackageManager) StartService(name string) (string, error)
StartService executes the service start command
func (*PacmanPackageManager) UninstallPackage ¶
func (c *PacmanPackageManager) UninstallPackage(name string) (string, error)
UninstallPackage executes the uninstallation command
func (*PacmanPackageManager) UpdatePackageList ¶
func (c *PacmanPackageManager) UpdatePackageList() (string, error)
UpdatePackageList updates list of available packages
type TransactionalUpdatePackageManager ¶
type TransactionalUpdatePackageManager struct {
// contains filtered or unexported fields
}
func NewTransactionalUpdatePackageManager ¶
func NewTransactionalUpdatePackageManager(executor *commonns.Executor) *TransactionalUpdatePackageManager
func (*TransactionalUpdatePackageManager) CheckModLoaded ¶
func (c *TransactionalUpdatePackageManager) CheckModLoaded(module string) error
CheckModLoaded checks if a module is loaded
func (*TransactionalUpdatePackageManager) CheckPackageInstalled ¶
func (c *TransactionalUpdatePackageManager) CheckPackageInstalled(name string) (string, error)
CheckPackageInstalled checks if a package is installed
func (*TransactionalUpdatePackageManager) Execute ¶
func (c *TransactionalUpdatePackageManager) Execute(envs []string, binary string, args []string, timeout time.Duration) (string, error)
Execute executes the given command with the specified environment variables, binary, and arguments.
func (*TransactionalUpdatePackageManager) GetServiceStatus ¶
func (c *TransactionalUpdatePackageManager) GetServiceStatus(name string) (string, error)
GetServiceStatus executes the service status command
func (*TransactionalUpdatePackageManager) InstallPackage ¶
func (c *TransactionalUpdatePackageManager) InstallPackage(name string) (string, error)
InstallPackage executes the installation command
func (*TransactionalUpdatePackageManager) Modprobe ¶
func (c *TransactionalUpdatePackageManager) Modprobe(module string) (string, error)
Modprobe executes the modprobe command
func (*TransactionalUpdatePackageManager) StartService ¶
func (c *TransactionalUpdatePackageManager) StartService(name string) (string, error)
StartService executes the service start command
func (*TransactionalUpdatePackageManager) UninstallPackage ¶
func (c *TransactionalUpdatePackageManager) UninstallPackage(name string) (string, error)
UninstallPackage executes the uninstallation command
func (*TransactionalUpdatePackageManager) UpdatePackageList ¶
func (c *TransactionalUpdatePackageManager) UpdatePackageList() (string, error)
UpdatePackageList updates list of available packages
type YumPackageManager ¶
type YumPackageManager struct {
// contains filtered or unexported fields
}
func NewYumPackageManager ¶
func NewYumPackageManager(executor *commonns.Executor) *YumPackageManager
func (*YumPackageManager) CheckModLoaded ¶
func (c *YumPackageManager) CheckModLoaded(module string) error
CheckModLoaded checks if a module is loaded
func (*YumPackageManager) CheckPackageInstalled ¶
func (c *YumPackageManager) CheckPackageInstalled(name string) (string, error)
CheckPackageInstalled checks if a package is installed
func (*YumPackageManager) Execute ¶
func (c *YumPackageManager) Execute(envs []string, binary string, args []string, timeout time.Duration) (string, error)
Execute executes the given command with the specified environment variables, binary, and arguments.
func (*YumPackageManager) GetServiceStatus ¶
func (c *YumPackageManager) GetServiceStatus(name string) (string, error)
GetServiceStatus executes the service status command
func (*YumPackageManager) InstallPackage ¶
func (c *YumPackageManager) InstallPackage(name string) (string, error)
InstallPackage executes the installation command
func (*YumPackageManager) Modprobe ¶
func (c *YumPackageManager) Modprobe(module string) (string, error)
Modprobe executes the modprobe command
func (*YumPackageManager) StartService ¶
func (c *YumPackageManager) StartService(name string) (string, error)
StartService executes the service start command
func (*YumPackageManager) UninstallPackage ¶
func (c *YumPackageManager) UninstallPackage(name string) (string, error)
UninstallPackage executes the uninstallation command
func (*YumPackageManager) UpdatePackageList ¶
func (c *YumPackageManager) UpdatePackageList() (string, error)
UpdatePackageList updates list of available packages
type ZypperPackageManager ¶
type ZypperPackageManager struct {
// contains filtered or unexported fields
}
func NewZypperPackageManager ¶
func NewZypperPackageManager(executor *commonns.Executor) *ZypperPackageManager
func (*ZypperPackageManager) CheckModLoaded ¶
func (c *ZypperPackageManager) CheckModLoaded(module string) error
CheckModLoaded checks if a module is loaded
func (*ZypperPackageManager) CheckPackageInstalled ¶
func (c *ZypperPackageManager) CheckPackageInstalled(name string) (string, error)
CheckPackageInstalled checks if a package is installed
func (*ZypperPackageManager) Execute ¶
func (c *ZypperPackageManager) Execute(envs []string, binary string, args []string, timeout time.Duration) (string, error)
Execute executes the given command with the specified environment variables, binary, and arguments.
func (*ZypperPackageManager) GetServiceStatus ¶
func (c *ZypperPackageManager) GetServiceStatus(name string) (string, error)
GetServiceStatus executes the service status command
func (*ZypperPackageManager) InstallPackage ¶
func (c *ZypperPackageManager) InstallPackage(name string) (string, error)
InstallPackage executes the installation command
func (*ZypperPackageManager) Modprobe ¶
func (c *ZypperPackageManager) Modprobe(module string) (string, error)
Modprobe executes the modprobe command
func (*ZypperPackageManager) StartService ¶
func (c *ZypperPackageManager) StartService(name string) (string, error)
StartService executes the service start command
func (*ZypperPackageManager) UninstallPackage ¶
func (c *ZypperPackageManager) UninstallPackage(name string) (string, error)
UninstallPackage executes the uninstallation command
func (*ZypperPackageManager) UpdatePackageList ¶
func (c *ZypperPackageManager) UpdatePackageList() (string, error)
UpdatePackageList updates list of available packages