| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Registry.MirrorUpload
Description
Complete mirror inventories and verified per-file upload data.
Synopsis
- data MirrorReadData
- mirrorReadDocument :: MirrorReadData -> CachedDoc
- data MirrorInventory
- data ExpectedMirrorFile
- data VerifiedArtifactBytes
- data MirrorUploadData metadata
- checkedMirrorInventory :: PackageName -> Version -> VersionDoc -> MirrorReadData -> Either PublishFault MirrorInventory
- splitMirrorInventory :: Set Text -> MirrorInventory -> Maybe (PackageDetails, MirrorReadData)
- expectedIdentityMatches :: ExpectedMirrorFile -> ExpectedMirrorFile -> Bool
- expectedTargetMatchesWith :: ExpectedMirrorFile -> Maybe Hash -> Artifact -> Bool
- targetIdentityConflict :: ExpectedMirrorFile -> Maybe Hash -> Artifact -> Bool
- inventoryPackage :: MirrorInventory -> PackageName
- inventoryVersion :: MirrorInventory -> Version
- inventoryDetails :: MirrorInventory -> PackageDetails
- inventoryFiles :: MirrorInventory -> NonEmpty ExpectedMirrorFile
- inventoryReadData :: MirrorInventory -> MirrorReadData
- expectedArtifact :: ExpectedMirrorFile -> Artifact
- expectedDescriptor :: ExpectedMirrorFile -> MirrorArtifact
- verifyMirrorBytes :: ExpectedMirrorFile -> ByteString -> Either PublishFault VerifiedArtifactBytes
- verifiedFile :: VerifiedArtifactBytes -> ExpectedMirrorFile
- verifiedBytes :: VerifiedArtifactBytes -> ByteString
- verifiedTargetHash :: VerifiedArtifactBytes -> Hash
- uploadInventory :: MirrorUploadData metadata -> MirrorInventory
- uploadFile :: MirrorUploadData metadata -> ExpectedMirrorFile
- uploadBytes :: MirrorUploadData metadata -> ByteString
- uploadTargetHash :: MirrorUploadData metadata -> Hash
- uploadMetadata :: MirrorUploadData metadata -> metadata
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 |
Instances
| Show MirrorReadData Source # | |
Defined in Ecluse.Core.Registry.MirrorUpload.Internal Methods showsPrec :: Int -> MirrorReadData -> ShowS # show :: MirrorReadData -> String # showList :: [MirrorReadData] -> ShowS # | |
| Eq MirrorReadData Source # | |
Defined in Ecluse.Core.Registry.MirrorUpload.Internal Methods (==) :: MirrorReadData -> MirrorReadData -> Bool # (/=) :: MirrorReadData -> MirrorReadData -> Bool # | |
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.
Instances
| Show MirrorInventory Source # | |
Defined in Ecluse.Core.Registry.MirrorUpload.Internal Methods showsPrec :: Int -> MirrorInventory -> ShowS # show :: MirrorInventory -> String # showList :: [MirrorInventory] -> ShowS # | |
| Eq MirrorInventory Source # | |
Defined in Ecluse.Core.Registry.MirrorUpload.Internal Methods (==) :: MirrorInventory -> MirrorInventory -> Bool # (/=) :: MirrorInventory -> MirrorInventory -> Bool # | |
data ExpectedMirrorFile Source #
The original artifact and its validated filename and nonempty digest refinement.
Instances
| Show ExpectedMirrorFile Source # | |
Defined in Ecluse.Core.Registry.MirrorUpload.Internal Methods showsPrec :: Int -> ExpectedMirrorFile -> ShowS # show :: ExpectedMirrorFile -> String # showList :: [ExpectedMirrorFile] -> ShowS # | |
| Eq ExpectedMirrorFile Source # | |
Defined in Ecluse.Core.Registry.MirrorUpload.Internal Methods (==) :: ExpectedMirrorFile -> ExpectedMirrorFile -> Bool # (/=) :: ExpectedMirrorFile -> ExpectedMirrorFile -> Bool # | |
data VerifiedArtifactBytes Source #
Bytes verified against this exact expected member.
Instances
| Show VerifiedArtifactBytes Source # | |
Defined in Ecluse.Core.Registry.MirrorUpload.Internal Methods showsPrec :: Int -> VerifiedArtifactBytes -> ShowS # show :: VerifiedArtifactBytes -> String # showList :: [VerifiedArtifactBytes] -> ShowS # | |
| Eq VerifiedArtifactBytes Source # | |
Defined in Ecluse.Core.Registry.MirrorUpload.Internal Methods (==) :: VerifiedArtifactBytes -> VerifiedArtifactBytes -> Bool # (/=) :: VerifiedArtifactBytes -> VerifiedArtifactBytes -> Bool # | |
data MirrorUploadData metadata Source #
One checked upload retains whole-version context and mandatory codec-owned metadata.
Instances
| Show metadata => Show (MirrorUploadData metadata) Source # | |
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 # | |
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.