ecluse
Safe HaskellNone
LanguageGHC2021

Ecluse.Config.Target

Description

Resolve tagged registry endpoints and their CodeArtifact store identities.

Synopsis

Resolution

resolveStoreBackend :: Ecosystem -> MirrorEndpoint -> Either ConfigError StoreBackend Source #

Resolve the read root and credential identity declared by a mirror target.

resolveUploadBackend :: Ecosystem -> MirrorEndpoint -> RegistryUrl -> Either ConfigError StoreBackend Source #

Resolve a native upload endpoint without admitting upload paths as read roots.

resolvePrivateBackend :: Ecosystem -> Target -> Either ConfigError (StoreBackend, CodeArtifactStore) Source #

Resolve a CodeArtifact private read root with the default token lifetime.

vetTargetTag :: Ecosystem -> Text -> Target -> Either ConfigError () Source #

Check the host against its declared tag. Repository path checks belong to the endpoint role.

vetPrivateRepository :: Ecosystem -> Target -> Either ConfigError () Source #

Require a CodeArtifact private read root for the mount format before checking its upstream chain.

vetPublicationRepository :: Ecosystem -> PublicationEndpoint -> Either ConfigError () Source #

A CodeArtifact publication uploadUrl addresses the same repository as its read root.

parseCodeArtifactHost :: Text -> Maybe (Text, Text, Text) Source #

Parse the CodeArtifact host into domain, owner and region, allowing hyphens in the domain.

isAccountId :: Text -> Bool Source #

Recognise the 12-digit AWS account id shared by CodeArtifact and SQS URL parsing.

Service credential presentation

storePresentation :: StoreTag -> Ecosystem -> ServicePresentation Source #

How a declared store asks for an ecosystem's service credential. Only CodeArtifact declares a mechanism.