Documentation
¶
Index ¶
- type Checksum
- type EPELProvider
- func (p *EPELProvider) Configure(rawCfg provider.ProviderConfig) error
- func (p *EPELProvider) Name() string
- func (p *EPELProvider) Plan(ctx context.Context) (*provider.SyncPlan, error)
- func (p *EPELProvider) SetName(name string)
- func (p *EPELProvider) SetValidationProgress(fn provider.ValidationProgressFn)
- func (p *EPELProvider) Sync(ctx context.Context, plan *provider.SyncPlan, opts provider.SyncOptions) (*provider.SyncReport, error)
- func (p *EPELProvider) Type() string
- func (p *EPELProvider) Validate(ctx context.Context) (*provider.ValidationReport, error)
- type Location
- type Package
- type PackageInfo
- type PrimaryXML
- type RepomdChecksum
- type RepomdData
- type RepomdLocation
- type RepomdXML
- type SizeInfo
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checksum ¶
type Checksum struct {
Type string `xml:"type,attr"`
Pkgid string `xml:"pkgid,attr"`
Value string `xml:",chardata"`
}
Checksum represents the checksum element
type EPELProvider ¶
type EPELProvider struct {
ValidationProgress provider.ValidationProgressFn
// contains filtered or unexported fields
}
EPELProvider implements provider.Provider for EPEL repositories
func NewEPELProvider ¶
func NewEPELProvider(dataDir string, logger *slog.Logger) *EPELProvider
NewEPELProvider creates a new EPEL provider
func (*EPELProvider) Configure ¶
func (p *EPELProvider) Configure(rawCfg provider.ProviderConfig) error
Configure loads provider-specific settings from the raw config
func (*EPELProvider) Name ¶
func (p *EPELProvider) Name() string
Name returns the provider identifier
func (*EPELProvider) SetName ¶
func (p *EPELProvider) SetName(name string)
SetName overrides the default provider name with the user-chosen config name.
func (*EPELProvider) SetValidationProgress ¶
func (p *EPELProvider) SetValidationProgress(fn provider.ValidationProgressFn)
SetValidationProgress sets the per-file progress callback for validation.
func (*EPELProvider) Sync ¶
func (p *EPELProvider) Sync(ctx context.Context, plan *provider.SyncPlan, opts provider.SyncOptions) (*provider.SyncReport, error)
Sync executes the plan — downloads, validates, retries (stub implementation)
func (*EPELProvider) Type ¶
func (p *EPELProvider) Type() string
func (*EPELProvider) Validate ¶
func (p *EPELProvider) Validate(ctx context.Context) (*provider.ValidationReport, error)
Validate checks integrity of all local content against expected checksums
type Location ¶
type Location struct {
Href string `xml:"href,attr"`
}
Location represents the location element
type Package ¶
type Package struct {
Type string `xml:"type,attr"`
Name string `xml:"name"`
Arch string `xml:"arch"`
Version Version `xml:"version"`
Checksum Checksum `xml:"checksum"`
Size SizeInfo `xml:"size"`
Location Location `xml:"location"`
}
Package represents a single rpm package in primary.xml
type PackageInfo ¶
type PackageInfo struct {
Name string
Arch string
Version string
Release string
Checksum string
Size int64
Location string
}
PackageInfo is a simplified representation of package metadata for syncing
type PrimaryXML ¶
type PrimaryXML struct {
XMLName xml.Name `xml:"metadata"`
Packages int `xml:"packages,attr"`
Package []Package `xml:"package"`
}
PrimaryXML represents the root metadata element of primary.xml
func ParsePrimary ¶
func ParsePrimary(data []byte) (*PrimaryXML, error)
ParsePrimary parses primary.xml data and returns package information. Uses xml.NewDecoder for better handling of RPM metadata XML which may contain XML entities and namespace prefixes.
func (*PrimaryXML) ExtractPackages ¶
func (p *PrimaryXML) ExtractPackages() []PackageInfo
ExtractPackages converts parsed Package structs to PackageInfo structs
type RepomdChecksum ¶
RepomdChecksum represents the checksum element
type RepomdData ¶
type RepomdData struct {
Type string `xml:"type,attr"`
Location RepomdLocation `xml:"location"`
Checksum RepomdChecksum `xml:"checksum"`
Size int64 `xml:"size"`
}
RepomdData represents a single data element in repomd.xml
type RepomdLocation ¶
type RepomdLocation struct {
Href string `xml:"href,attr"`
}
RepomdLocation represents the location element
type RepomdXML ¶
type RepomdXML struct {
XMLName xml.Name `xml:"repomd"`
Data []RepomdData `xml:"data"`
}
RepomdXML represents the structure of repomd.xml
func ParseRepomd ¶
ParseRepomd parses repomd.xml data
func (*RepomdXML) FindPrimaryChecksum ¶
FindPrimaryChecksum finds the checksum of primary.xml.gz in the repomd data
func (*RepomdXML) FindPrimaryLocation ¶
FindPrimaryLocation finds the location of primary.xml.gz in the repomd data