Documentation ¶
Index ¶
- func Manipulate(from io.Reader, to io.Writer, removeContaining, append []string, ...) error
- func ManipulateFile(path string, removeContaining, append []string, eachLine func(string) *string) (err error)
- type OperatingSystem
- type OperatingSystemMajor
- type PackageManager
- func (p *PackageManager) Add(repo *Repository) error
- func (p *PackageManager) CurrentVersions(possiblePackages ...string) ([]*Software, error)
- func (p *PackageManager) Init() error
- func (p *PackageManager) Install(installVersion *Software, more ...*Software) error
- func (p *PackageManager) RefreshInstalled() error
- type Packages
- type Repository
- type Software
- type SystemD
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Manipulate ¶
Types ¶
type OperatingSystem ¶
type OperatingSystem struct {
Packages Packages
}
var ( UnknownOS OperatingSystem = OperatingSystem{} Ubuntu OperatingSystem = OperatingSystem{DebianBased} CentOS OperatingSystem = OperatingSystem{REMBased} )
func (OperatingSystem) String ¶
func (o OperatingSystem) String() string
type OperatingSystemMajor ¶
type OperatingSystemMajor struct { OperatingSystem OperatingSystem Version string }
var ( Unknown OperatingSystemMajor = OperatingSystemMajor{UnknownOS, ""} Bionic OperatingSystemMajor = OperatingSystemMajor{Ubuntu, "bionic"} CentOS7 OperatingSystemMajor = OperatingSystemMajor{CentOS, "7"} )
func GetOperatingSystem ¶
func GetOperatingSystem() (OperatingSystemMajor, error)
func (OperatingSystemMajor) String ¶
func (o OperatingSystemMajor) String() string
type PackageManager ¶
type PackageManager struct {
// contains filtered or unexported fields
}
func NewPackageManager ¶
func NewPackageManager(monitor mntr.Monitor, os OperatingSystem, systemd *SystemD) *PackageManager
func (*PackageManager) Add ¶
func (p *PackageManager) Add(repo *Repository) error
func (*PackageManager) CurrentVersions ¶
func (p *PackageManager) CurrentVersions(possiblePackages ...string) ([]*Software, error)
func (*PackageManager) Init ¶
func (p *PackageManager) Init() error
func (*PackageManager) Install ¶
func (p *PackageManager) Install(installVersion *Software, more ...*Software) error
func (*PackageManager) RefreshInstalled ¶
func (p *PackageManager) RefreshInstalled() error
type Repository ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.