ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.Metadata.Fetch

Description

Full and selected metadata reads with bounded decoding, source digests, and public authority control.

Synopsis

Reading from an origin

fetchManifest :: EcosystemRead -> ManifestFetch Source #

Fetch a package's whole document from an origin and finish it into a Manifest.

fetchVersion :: EcosystemRead -> TracingPort -> OriginClient -> PackageName -> Version -> IO (Either MetadataError VersionRead) Source #

Fetch a package's whole document from an origin and finish only the version asked for.

chargingSelectedReads :: (ByteString -> Int) -> (Int -> IO ()) -> EcosystemRead -> EcosystemRead Source #

Charge selected-read chunks before the adapter retains raw publication fields.

Reading from any body

readManifest :: EcosystemRead -> TracingPort -> ReadTerms -> PackageName -> Body -> IO (Either MetadataError Manifest) Source #

Read a full manifest from any body, charging and hashing chunks before decoding, then finishing after closure.

readVersion :: EcosystemRead -> TracingPort -> ReadTerms -> PackageName -> Version -> Body -> IO (Either MetadataError VersionRead) Source #

Read one version without a source digest. A wrapped worker walk owns its raw-field charges.