Documentation ¶
Index ¶
- func DebianPackageInstall(pkgName string, action PackageAction, upstartbased bool, ...) *exec.Commander
- func Info(ctx context.Context, m metrics.Metrics) (*osinfo.Info, error)
- func Install(ctx context.Context, m metrics.Metrics, pkg string, upstart bool) (int, error)
- func InstallSudo(ctx context.Context, m metrics.Metrics, upstart bool) (int, error)
- func Purge(ctx context.Context, m metrics.Metrics, pkg string, upstart bool) (int, error)
- func Remove(ctx context.Context, m metrics.Metrics, pkg string, upstart bool) (int, error)
- func UpdateApt(ctx context.Context, m metrics.Metrics) (int, error)
- type PackageAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebianPackageInstall ¶
func DebianPackageInstall(pkgName string, action PackageAction, upstartbased bool, cmds ...exec.CommanderOption) *exec.Commander
DebianPackageInstall returns a exec.Command that is executed to install/remove a giving ubuntu package.
func Info ¶
Info retrieves the OSRelease details related to the operating system. Specifically useful for debian/linux systems.
func InstallSudo ¶
InstallSudo runs necessary commands to install `sudo` package on ubuntu/devian systems
Types ¶
type PackageAction ¶
type PackageAction int
PackageAction defines a int type to represent a package action for a package installer.
const ( InstallAction PackageAction = iota RemoveAction PurgeAction )
pkg constant types
func (PackageAction) String ¶
func (ap PackageAction) String() string
String returns the name of the action.
Click to show internal directories.
Click to hide internal directories.