packaging

package
v0.0.0-...-0a82276 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InstallDependency

func InstallDependency(dep Dependency, base base.Base) error

InstallDependency executes the appropriate commands to install the specified dependency targeting the provided base.

Types

type Dependency

type Dependency interface {
	PackageList(base.Base) ([]Package, error)
}

Dependency is implemented by objects that can provide a series-specific list of packages for installing a particular software dependency.

type Package

type Package struct {
	// The name of the package to install
	Name string

	// Additional options to be passed to the package manager.
	InstallOptions string

	// The package manager to use for installing
	PackageManager PackageManagerName
}

Package encapsulates the information required for installing a package.

func MakePackageList

func MakePackageList(pm PackageManagerName, opts string, packages ...string) []Package

MakePackageList returns a list of Package instances for each provided package name. All package entries share the same package manager name and install options.

type PackageManagerName

type PackageManagerName string

PackageManagerName describes a package manager.

const (
	AptPackageManager  PackageManagerName = "apt"
	SnapPackageManager PackageManagerName = "snap"
)

The list of supported package managers.

Directories

Path Synopsis
Package commands contains an interface which returns common package-manager related commands and the reference implementation for apt and yum-based systems.
Package commands contains an interface which returns common package-manager related commands and the reference implementation for apt and yum-based systems.
Package config defines an interface which returns packaging-related configuration options and operations depending on the desired package-management system.
Package config defines an interface which returns packaging-related configuration options and operations depending on the desired package-management system.
Package manager defines an interface which can carry out numerous package-management related operations on the local system and the respective implementations on apt and yum-based systems.
Package manager defines an interface which can carry out numerous package-management related operations on the local system and the respective implementations on apt and yum-based systems.
testing
Package testing contains a mock implementation of the manager.PackageManager interface which always returns positive outcomes and a nil error.
Package testing contains a mock implementation of the manager.PackageManager interface which always returns positive outcomes and a nil error.

Jump to

Keyboard shortcuts

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