| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Registry.Cargo.Discovery
Description
Origin-scoped sparse discovery and checksum-bound native download templates.
Synopsis
- data CargoDiscovery
- cargoDiscovery :: CredentialMapping -> OriginClient -> IO (Either MetadataError CargoDiscovery)
- parseDiscoveryWithDepth :: Int -> AllowedHostPorts -> Text -> ByteString -> Either MetadataError CargoDiscovery
- discoveryDl :: CargoDiscovery -> Text
- discoveryApi :: CargoDiscovery -> Maybe Text
- discoveryIndex :: CargoDiscovery -> Text
- renderCargoDiscovery :: Text -> Maybe Text -> Bool -> ByteString
- data CargoArtifactCoordinate
- cargoArtifactCoordinate :: Text -> Version -> Hash -> Either Text CargoArtifactCoordinate
- coordinateName :: CargoArtifactCoordinate -> Text
- coordinateVersion :: CargoArtifactCoordinate -> Version
- coordinateFilename :: CargoArtifactCoordinate -> Filename
- coordinateChecksum :: CargoArtifactCoordinate -> Hash
- bindCargoDownload :: CargoDiscovery -> CargoArtifactCoordinate -> Either Text Text
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.
Instances
| Show CargoArtifactCoordinate Source # | |
Defined in Ecluse.Core.Registry.Cargo.Discovery Methods showsPrec :: Int -> CargoArtifactCoordinate -> ShowS # show :: CargoArtifactCoordinate -> String # showList :: [CargoArtifactCoordinate] -> ShowS # | |
| Eq CargoArtifactCoordinate Source # | |
Defined in Ecluse.Core.Registry.Cargo.Discovery Methods (==) :: CargoArtifactCoordinate -> CargoArtifactCoordinate -> Bool # (/=) :: CargoArtifactCoordinate -> CargoArtifactCoordinate -> Bool # | |
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.