ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

Ecluse.Core.Registry.Cargo.Discovery

Description

Origin-scoped sparse discovery and checksum-bound native download templates.

Synopsis

Documentation

data CargoDiscovery Source #

A checked response from one authorised index origin. Its URLs grant no new authority.

cargoDiscovery :: CredentialMapping -> OriginClient -> IO (Either MetadataError CargoDiscovery) Source #

Read bounded discovery under mapping, through the same transport and public control as index metadata.

parseDiscoveryWithDepth :: Int -> AllowedHostPorts -> Text -> ByteString -> Either MetadataError CargoDiscovery Source #

Validate bounded discovery against predeclared authority and the selected origin.

discoveryDl :: CargoDiscovery -> Text Source #

The checked native template, with markers still unexpanded.

discoveryApi :: CargoDiscovery -> Maybe Text Source #

The advertised API remains a location hint, never an upload credential grant.

discoveryIndex :: CargoDiscovery -> Text Source #

The complete selected index root, including any configured base path.

renderCargoDiscovery :: Text -> Maybe Text -> Bool -> ByteString Source #

Local discovery uses only the supplied local routes and authentication requirement.

data CargoArtifactCoordinate Source #

Exact native claims for one archive, independent of its download URL's final component.

cargoArtifactCoordinate :: Text -> Version -> Hash -> Either Text CargoArtifactCoordinate Source #

Bind published spelling, raw version and SHA-256 before any template interpolation.

coordinateName :: CargoArtifactCoordinate -> Text Source #

Exact published name, including native case and punctuation.

coordinateVersion :: CargoArtifactCoordinate -> Version Source #

Native raw version, including build metadata.

coordinateFilename :: CargoArtifactCoordinate -> Filename Source #

The checked logical archive name does not depend on the URL's terminal component.

coordinateChecksum :: CargoArtifactCoordinate -> Hash Source #

The validated SHA-256 from the same native row as this coordinate.

bindCargoDownload :: CargoDiscovery -> CargoArtifactCoordinate -> Either Text Text Source #

Expand only native markers and recheck the address against the captured origin.