distro

package
v0.14.10 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbsoluteProperties added in v0.9.0

type AbsoluteProperties struct {
	// The Name of the distro, e.g. "Wolfi".
	Name string

	// The known possible git remote URLs of the distro repo.
	DistroRemoteURLs []string

	// The known possible git remote URLs of the distro's advisories repo.
	AdvisoriesRemoteURLs []string

	// APKRepositoryURL is the URL to the distro's package repository (e.g.
	// "https://packages.wolfi.dev/os").
	APKRepositoryURL string

	// SupportedArchitectures is a list of architectures supported by the distro.
	SupportedArchitectures []string
}

AbsoluteProperties describe the aspects of the distro that are constant and not a function of any user's local environment.

type Distro

type Distro struct {
	Local    LocalProperties
	Absolute AbsoluteProperties
}

Distro represents a wolfictl-compatible distro, along with important properties discovered about how the user interacts with the distro.

func Detect

func Detect() (Distro, error)

Detect tries to automatically detect which distro the user wants to operate on by trying to match the current working directory with a known repository for a distro's packages or advisories.

func DetectFromDir added in v0.9.0

func DetectFromDir(dir string) (Distro, error)

DetectFromDir tries to identify a Distro by inspecting the given directory to see if it is a repository for a distro's packages or advisories.

type LocalProperties added in v0.9.0

type LocalProperties struct {
	// PackagesRepo is the context about the user's local clone of the distro's
	// packages repo.
	PackagesRepo LocalRepo

	// AdvisoriesRepo is the context about the user's local clone of the distro's
	// advisories repo.
	AdvisoriesRepo LocalRepo
}

LocalProperties describe the aspects of the distro that are specific to the context of the user's local environment.

type LocalRepo added in v0.9.0

type LocalRepo struct {
	// Dir is the path to the directory containing the user's clone of the repo.
	Dir string

	// UpstreamName is the name of the locally configured git remote that the
	// user's clone of the repo uses to reference the upstream repo.
	UpstreamName string

	// ForkPoint is the commit hash of the latest commit had in common between the
	// local repo and the upstream repo main branch.
	ForkPoint string
}

LocalRepo stores the context about a local git repository that is needed for interacting with this distro.

Jump to

Keyboard shortcuts

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