linux

package
v0.0.0-...-6d3478e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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

func Info(ctx context.Context, m metrics.Metrics) (*osinfo.Info, error)

Info retrieves the OSRelease details related to the operating system. Specifically useful for debian/linux systems.

func Install

func Install(ctx context.Context, m metrics.Metrics, pkg string, upstart bool) (int, error)

Install runs necessary commands to install package on ubuntu/devian systems

func InstallSudo

func InstallSudo(ctx context.Context, m metrics.Metrics, upstart bool) (int, error)

InstallSudo runs necessary commands to install `sudo` package on ubuntu/devian systems

func Purge

func Purge(ctx context.Context, m metrics.Metrics, pkg string, upstart bool) (int, error)

Purge runs necessary commands to remove package on ubuntu/devian systems

func Remove

func Remove(ctx context.Context, m metrics.Metrics, pkg string, upstart bool) (int, error)

Remove runs necessary commands to remove package on ubuntu/devian systems

func UpdateApt

func UpdateApt(ctx context.Context, m metrics.Metrics) (int, error)

UpdateApt 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL