Documentation
¶
Index ¶
Constants ¶
View Source
const ( X8664Arch packages.Architecture = "x86_64" // DefaultArch is the default architecture for which scrape for packages. DefaultArch = X8664Arch CentosType = "centos" AmazonLinuxV1Type = "amazonlinux" AmazonLinuxV2Type = "amazonlinux2" AmazonLinuxV2022Type = "amazonlinux2022" AmazonLinuxV2023Type = "amazonlinux2023" 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
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) }
Click to show internal directories.
Click to hide internal directories.