6e6481e09a
Parallel package-type PRs conflict because every type edits the same shared lines (README tables, provider.go, server.go imports, the package type list, UI maps, the e2e caching table). A new type now only adds files.
- move per-type README sections into docs/<type>/{remote,local,virtual}.md
- split provider.go capability and metadata types into cap_*.go and metadata_*.go
- import providers via internal/provider/all, one file per type
- declare each package type in package_type_<type>.go, registered via init()
- split the e2e caching cases and UI colours/snippets into per-type files
Reviewed-on: #150
Co-authored-by: unkin-agent <unkin-agent@unkin.net>
Co-committed-by: unkin-agent <unkin-agent@unkin.net>
61 lines
1.4 KiB
Go
61 lines
1.4 KiB
Go
package provider
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
)
|
|
|
|
type RPMMetadataReader interface {
|
|
ListRPMMetadataEntries(ctx context.Context, repoName string) ([]RPMMetadata, error)
|
|
}
|
|
|
|
type RPMMetadata struct {
|
|
RepoName string
|
|
FilePath string
|
|
ContentHash string
|
|
Name string
|
|
Epoch int
|
|
Version string
|
|
Release string
|
|
Arch string
|
|
Summary string
|
|
Description string
|
|
RPMSize int64
|
|
InstalledSize int64
|
|
License string
|
|
Vendor string
|
|
Group string
|
|
BuildHost string
|
|
SourceRPM string
|
|
URL string
|
|
Packager string
|
|
Requires []RPMDep
|
|
Provides []RPMDep
|
|
Conflicts []RPMDep
|
|
Obsoletes []RPMDep
|
|
Files []RPMFile
|
|
Changelogs []RPMChangelog
|
|
// CreatedAt is the persisted upload timestamp; used as a stable, replica-independent
|
|
// value for the repodata <time>/<revision> fields so generated indexes are deterministic.
|
|
CreatedAt time.Time
|
|
}
|
|
|
|
type RPMDep struct {
|
|
Name string `json:"name"`
|
|
Flags string `json:"flags,omitempty"`
|
|
Epoch string `json:"epoch,omitempty"`
|
|
Version string `json:"version,omitempty"`
|
|
Release string `json:"release,omitempty"`
|
|
}
|
|
|
|
type RPMFile struct {
|
|
Path string `json:"path"`
|
|
Type string `json:"type,omitempty"`
|
|
}
|
|
|
|
type RPMChangelog struct {
|
|
Author string `json:"author"`
|
|
Date int64 `json:"date"`
|
|
Text string `json:"text"`
|
|
}
|