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>
35 lines
1.1 KiB
Go
35 lines
1.1 KiB
Go
package provider
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
)
|
|
|
|
// DebMetadataReader is the read surface the deb LocalIndexer needs to
|
|
// regenerate a flat apt repository (Packages/Release) from stored rows.
|
|
// *database.DB satisfies it; ServeLocalIndex type-asserts the FileStore to it,
|
|
// mirroring how the rpm provider reaches its RPMMetadataReader.
|
|
type DebMetadataReader interface {
|
|
ListDebMetadataEntries(ctx context.Context, repoName string) ([]DebMetadata, error)
|
|
}
|
|
|
|
// DebMetadata is the derived per-package metadata for a Debian .deb, carrying
|
|
// the full raw control stanza so the Packages index can be regenerated
|
|
// faithfully alongside the computed size/md5/sha256 apt requires.
|
|
type DebMetadata struct {
|
|
RepoName string
|
|
FilePath string
|
|
ContentHash string
|
|
Name string
|
|
Version string
|
|
Architecture string
|
|
Control string
|
|
Size int64
|
|
MD5 string
|
|
SHA256 string
|
|
// CreatedAt is the persisted insert time; the Release Date: is derived from
|
|
// the newest value so the index is byte-identical across replicas and
|
|
// regenerations (issue #117) rather than stamped from wall clock.
|
|
CreatedAt time.Time
|
|
}
|