ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.MirrorUpload

Description

Complete mirror inventories and verified per-file upload data.

Synopsis

Documentation

data MirrorReadData Source #

Supported read fields retain their source coordinates independently of physical uploads.

Constructors

NpmMirrorRead Object 
PyPIMirrorRead SimpleDocument 
CargoMirrorRead CargoDocument

Original crates.io rows. Their stored source identity never grants target transport authority.

RubyGemsMirrorRead GemDocument 

mirrorReadDocument :: MirrorReadData -> CachedDoc Source #

Restore retained source fields without encoding or reparsing them.

data MirrorInventory Source #

Membership comes from the complete paired version snapshot, never a requested-file subset.

data ExpectedMirrorFile Source #

The original artifact and its validated filename and nonempty digest refinement.

data MirrorUploadData metadata Source #

One checked upload retains whole-version context and mandatory codec-owned metadata.

Instances

Instances details
Show metadata => Show (MirrorUploadData metadata) Source # 
Instance details

Defined in Ecluse.Core.Registry.MirrorUpload.Internal

Methods

showsPrec :: Int -> MirrorUploadData metadata -> ShowS #

show :: MirrorUploadData metadata -> String #

showList :: [MirrorUploadData metadata] -> ShowS #

Eq metadata => Eq (MirrorUploadData metadata) Source # 
Instance details

Defined in Ecluse.Core.Registry.MirrorUpload.Internal

Methods

(==) :: MirrorUploadData metadata -> MirrorUploadData metadata -> Bool #

(/=) :: MirrorUploadData metadata -> MirrorUploadData metadata -> Bool #

checkedMirrorInventory :: PackageName -> Version -> VersionDoc -> MirrorReadData -> Either PublishFault MirrorInventory Source #

Reject a mismatched identity or source payload before deriving the complete physical inventory.

splitMirrorInventory :: Set Text -> MirrorInventory -> Maybe (PackageDetails, MirrorReadData) Source #

Retain only newly owned files and their original source coordinates for a durable fragment.

expectedIdentityMatches :: ExpectedMirrorFile -> ExpectedMirrorFile -> Bool Source #

Source locations may change, but filenames, digest identities, and known sizes must agree.

expectedTargetMatchesWith :: ExpectedMirrorFile -> Maybe Hash -> Artifact -> Bool Source #

A persisted SHA-256 computed from verified bytes can bridge different source and target algorithms.

targetIdentityConflict :: ExpectedMirrorFile -> Maybe Hash -> Artifact -> Bool Source #

Distinguish contradictory target evidence from a target that advertises no usable proof.

inventoryPackage :: MirrorInventory -> PackageName Source #

The inventory's validated package identity.

inventoryVersion :: MirrorInventory -> Version Source #

The inventory's validated version identity.

inventoryDetails :: MirrorInventory -> PackageDetails Source #

Original admitted policy facts and complete source membership.

inventoryFiles :: MirrorInventory -> NonEmpty ExpectedMirrorFile Source #

Expected physical files, with identical duplicate source entries collapsed.

inventoryReadData :: MirrorInventory -> MirrorReadData Source #

Supported fields paired with this inventory.

expectedArtifact :: ExpectedMirrorFile -> Artifact Source #

The original admitted file facts and source coordinate.

expectedDescriptor :: ExpectedMirrorFile -> MirrorArtifact Source #

Validated filename and nonempty expected digest facts.

verifyMirrorBytes :: ExpectedMirrorFile -> ByteString -> Either PublishFault VerifiedArtifactBytes Source #

Verify the strongest admitted digest without permitting replacement bytes at publication.

verifiedFile :: VerifiedArtifactBytes -> ExpectedMirrorFile Source #

The member whose strongest digest verified this body.

verifiedBytes :: VerifiedArtifactBytes -> ByteString Source #

The exact body that passed byte verification.

verifiedTargetHash :: VerifiedArtifactBytes -> Hash Source #

SHA-256 computed from the verified body, separate from source claims.

uploadInventory :: MirrorUploadData metadata -> MirrorInventory Source #

Whole-version context retained by one checked upload.

uploadFile :: MirrorUploadData metadata -> ExpectedMirrorFile Source #

The checked member selected for this upload.

uploadBytes :: MirrorUploadData metadata -> ByteString Source #

Verified bytes from this upload, without a replacement body.

uploadTargetHash :: MirrorUploadData metadata -> Hash Source #

The target digest computed from the same verified upload body.

uploadMetadata :: MirrorUploadData metadata -> metadata Source #

Required ecosystem upload metadata.