Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotDistroRepo = fmt.Errorf("directory is not a distro (packages) or advisories repository")
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 ¶
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
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.