Documentation ¶
Index ¶
- Variables
- func Exec(command string) error
- func FileContains(fileContent string, content string) bool
- func Find(regex string, fileContent string) ([]int, error)
- func FindAll(regex string, fileContent string) ([][]int, error)
- func GetEnv(variableName string) string
- func GetProperLines(regex string, fileContent string) ([]string, error)
- func GetRandomLetters(length int) string
- func InstallPackages(packageStrings ...string) error
- func RemoveComments(fileContent, singleLineStart, multiLineStart, multiLineEnd string) string
- func RemovePackages(packagesToRemove ...string) error
- func ShellCommand(script string) (string, error)
- func Sleep(milliseconds int)
- type AurPackage
- type AurResponseLayout
- type CreateConfigOptions
- type Daemon
- type DaemonApi
- type DirData
- type Distro
- type FsApi
- func (f *FsApi) Apply() (int, error)
- func (f *FsApi) CompareConfigs(received, desired []byte, configType uint) error
- func (f *FsApi) Copy(from, to string) error
- func (f *FsApi) CreateConfig(path, content string, options CreateConfigOptions) error
- func (f *FsApi) CreateFile(path, content string, optional bool) error
- func (f *FsApi) FileExists(path string, isDirectory bool) bool
- func (f *FsApi) PathExists(path string) bool
- func (f *FsApi) ReadDir(path string) ([]DirData, error)
- func (f *FsApi) ReadFile(path string) (string, error)
- func (f *FsApi) UpdateConfig(path, content string, options CreateConfigOptions) error
- type GitApi
- type InitSystem
- type Package
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrRequiresRoot = errors.New("operation requires root") ErrUnsupportedInit = errors.New("unknown init system") ErrDaemonDoesNotExist = errors.New("daemon does not exist") ErrUnknownDirectory = errors.New("init system uses unknown init scripts directory") ErrUnsupportedInitOutput = errors.New("init system produced unknown output") )
Functions ¶
func FileContains ¶
func GetRandomLetters ¶
func InstallPackages ¶
func RemoveComments ¶
func RemovePackages ¶
func ShellCommand ¶
Types ¶
type AurPackage ¶
type AurResponseLayout ¶
type AurResponseLayout struct {
Results []AurPackage
}
type CreateConfigOptions ¶
type DaemonApi ¶
type DaemonApi struct {
ImportLoopData *shared.ImportLoopData
}
func (*DaemonApi) DisableDaemon ¶
func (*DaemonApi) EnableDaemon ¶
func (*DaemonApi) RestartDaemon ¶
func (*DaemonApi) StartDaemon ¶
func (*DaemonApi) StopDaemon ¶
type FsApi ¶
func (*FsApi) CompareConfigs ¶
func (*FsApi) CreateConfig ¶
func (f *FsApi) CreateConfig(path, content string, options CreateConfigOptions) error
func (*FsApi) PathExists ¶
func (*FsApi) UpdateConfig ¶
func (f *FsApi) UpdateConfig(path, content string, options CreateConfigOptions) error
type InitSystem ¶
type InitSystem string
const ( SYSTEMD InitSystem = "systemd" RUNIT InitSystem = "runit" OPENRC InitSystem = "openrc" /* lack of sysv, s6 and 66 */ UNKNOWN InitSystem = "" )
func GetInitSystem ¶
func GetInitSystem() (InitSystem, error)
func (InitSystem) String ¶
func (is InitSystem) String() string
type Package ¶
type Package struct { Name string Version string Description string Architecture string URL string Licenses []string Groups []string Provides []string DependsOn []string OptionalDeps []string RequiredBy []string OptionalFor []string ConflictsWith []string Replaces []string InstalledSize []string Packager string BuildDate string InstallDate string InstallReason string InstallScript bool ValidatedBy string }
func GetPackage ¶
Click to show internal directories.
Click to hide internal directories.