distro

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	X8664Arch packages.Architecture = "x86_64"

	// Default architecture for which scrape for packages.
	DefaultArch          = X8664Arch
	CentosType           = "centos"
	AmazonLinuxV1Type    = "amazonlinux"
	AmazonLinuxV2Type    = "amazonlinux2"
	AmazonLinuxV2022Type = "amazonlinux2022"
	DebianType           = "debian"
	UbuntuType           = "ubuntu"
	FedoraType           = "fedora"
	OracleType           = "oracle"
	ArchLinuxType        = "archlinux"
)

Variables

View Source
var (
	ErrDistroNotConfigured      = errors.New("the distro has not been configured")
	ErrDistroNotFound           = errors.New("no distribution found with the specified name")
	ErrNoDistroVersionSpecified = errors.New("no versions specified")
	ErrDomainsFromMirrorUrls    = errors.New("error while retrieving DNS names from mirrors URLs")
)

Functions

func RepositorySliceContains added in v0.2.0

func RepositorySliceContains(s []packages.Repository, e packages.Repository) bool

Types

type Config

type Config struct {
	// A list of Mirrors to scrape.
	Mirrors []packages.Mirror

	// The mirrored repositories.
	Repositories []packages.Repository

	// A list of architecture for to which scrape packages.
	Archs []packages.Architecture

	// A list of Distro versions.
	Versions []Version

	// Options for visual output.
	Output output.Options `json:"output,omitempty"`
}

func (*Config) BuildTemplates added in v0.3.0

func (c *Config) BuildTemplates(vars map[string]interface{}) error

BuildTemplates computes templated Config fields by evaluating the template against a set of variables, expected as a map of string to interface argument. As of now, only the URI field of Config.Repositories is a supported field to be templated.

type Distro

type Distro interface {
	// Configure expects distro.Config and arbitrary variables
	// for config fields that support templating.
	Configure(Config) error

	// GetPackages should return a slice of Package based on
	// the provided SearchOptions-type filter.
	SearchPackages(packages.SearchOptions) ([]packages.Package, error)
}

type Type

type Type string

type Version

type Version string

Directories

Path Synopsis
v1
v2

Jump to

Keyboard shortcuts

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