Documentation
¶
Overview ¶
Package repocompare loads and compares RPM repository package inventories.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fetcher ¶
type Fetcher interface {
// Fetch returns the bytes at rawURL.
Fetch(ctx context.Context, rawURL string, disableSSLVerify bool) ([]byte, error)
}
Fetcher retrieves repository metadata.
type HTTPFetcher ¶
type HTTPFetcher struct {
Attempts int
}
HTTPFetcher retrieves repository metadata over HTTP with bounded retries.
type Package ¶
type Package struct {
Name string
Epoch string
Version string
Release string
Arch string
Kind projectconfig.SubrepoKind
}
Package identifies one package in RPM primary metadata.
func LoadRepositories ¶
func LoadRepositories( ctx context.Context, fetcher Fetcher, repositories []Repository, ) ([]Package, error)
LoadRepositories snapshots each repository's repomd document before loading its primary metadata.
func (Package) EVR ¶
EVR returns the package's epoch, version, and release without its architecture.
type PackageReport ¶
type PackageReport struct {
Name string `json:"name" table:"Name"`
Summary string `json:"summary" table:"Summary"`
LeftNEVRs string `json:"leftNevrs" table:"Left NEVRs"`
RightNEVRs string `json:"rightNevrs" table:"Right NEVRs"`
}
PackageReport summarizes both inventories for one differing package name.
func Compare ¶
func Compare(left, right []Package) ([]PackageReport, error)
Compare returns one package-centric report for each package name with inventory differences.
type PackageStatus ¶
type PackageStatus string
PackageStatus summarizes why a package name appears in the comparison.
const ( // PackageStatusMissingFromRight indicates that the left contains an identity absent from the right. PackageStatusMissingFromRight PackageStatus = "missing-from-right" // PackageStatusAddedInRight indicates that the right contains an identity absent from the left. PackageStatusAddedInRight PackageStatus = "added-in-right" // PackageStatusArchitecturesDiffer indicates that matching NEVRs have different architecture sets. PackageStatusArchitecturesDiffer PackageStatus = "architectures-differ" )
type Repository ¶
type Repository struct {
ID string
Kind projectconfig.SubrepoKind
URL string
DisableSSLVerify bool
}
Repository describes one physical RPM repository.