| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Runtime.Maintenance.CodeArtifact.Decide
Description
Every decision the CodeArtifact store-maintenance leaf makes, over amazonka's own request
and response types. amazonka is trusted for serialisation, signing, and decoding against the
service model, so what stays ours is which call to build and how to read what comes back. The
read-only calls and the evidence they preserve live in
Ecluse.Runtime.Maintenance.CodeArtifact.Read.
Synopsis
- data CodeArtifactStore = CodeArtifactStore {}
- codeArtifactFormat :: Ecosystem -> Maybe CodeArtifactFormat
- formatEcosystem :: CodeArtifactFormat -> Ecosystem
- formatToken :: CodeArtifactFormat -> Text
- codeArtifactFacts :: NameAlphabet -> CodeArtifactStore -> StoreFacts
- deleteCeiling :: DeleteCeiling
- listPackagesRequest :: CodeArtifactStore -> NamePrefix -> Maybe Text -> ListPackages
- listVersionsRequest :: CodeArtifactStore -> PackageName -> Maybe Text -> ListPackageVersions
- listVersionsResult :: Either Error ListPackageVersionsResponse -> Either StoreFault ListPackageVersionsResponse
- deleteRequest :: CodeArtifactStore -> PackageName -> [Version] -> DeletePackageVersions
- describeRepositoryRequest :: CodeArtifactStore -> DescribeRepository
- describeUpstreamRequest :: CodeArtifactStore -> RepositoryName -> DescribeRepository
- listTagsRequest :: Text -> ListTagsForResource
- cursorTagRequest :: Ecosystem -> Text -> NamePrefix -> TagResource
- cursorUntagRequest :: Ecosystem -> Text -> UntagResource
- cursorOfTags :: NameAlphabet -> Ecosystem -> [Tag] -> Maybe NamePrefix
- packagesOfPage :: Ecosystem -> [PackageSummary] -> [PackageName]
- presenceOf :: PackageVersionStatus -> VersionPresence
- foldDeleteResponse :: [Version] -> DeletePackageVersionsResponse -> [(Version, VersionOutcome)]
- classifyRepository :: RepositoryDescription -> StoreClass
- repositoryOfStore :: CodeArtifactStore -> RepositoryName
- upstreamLinksOf :: RepositoryDescription -> RepositoryLinks
- consentOfTags :: [Tag] -> ConsentVerdict
- repositoryOfResponse :: DescribeRepositoryResponse -> Either StoreFault RepositoryDescription
- arnOfDescription :: RepositoryDescription -> Either StoreFault Text
- consentDescriptor :: Text
- classifyStoreFault :: Error -> StoreFault
- describeUpstreamRefusal :: Error -> UpstreamSafety
- describeRepositoryGrant :: PermissionName
Coordinates
data CodeArtifactStore Source #
Where one CodeArtifact repository lives. The composition root parses these from the vetted mirror-store URL, so the leaf never sees a URL.
Constructors
| CodeArtifactStore | |
Fields
| |
Instances
| Show CodeArtifactStore Source # | |
Defined in Ecluse.Runtime.Maintenance.CodeArtifact.Decide.Internal Methods showsPrec :: Int -> CodeArtifactStore -> ShowS # show :: CodeArtifactStore -> String # showList :: [CodeArtifactStore] -> ShowS # | |
| Eq CodeArtifactStore Source # | |
Defined in Ecluse.Runtime.Maintenance.CodeArtifact.Decide.Internal Methods (==) :: CodeArtifactStore -> CodeArtifactStore -> Bool # (/=) :: CodeArtifactStore -> CodeArtifactStore -> Bool # | |
codeArtifactFormat :: Ecosystem -> Maybe CodeArtifactFormat Source #
The format CodeArtifact addresses an ecosystem by, Nothing where it has none.
formatEcosystem :: CodeArtifactFormat -> Ecosystem Source #
The ecosystem a format was built from.
formatToken :: CodeArtifactFormat -> Text Source #
The format as CodeArtifact spells it, which is also the first path segment of a repository's per-format endpoint.
What the backend does
codeArtifactFacts :: NameAlphabet -> CodeArtifactStore -> StoreFacts Source #
What CodeArtifact does: it re-admits a version published again after a delete, and has applied it by the time it answers. The alphabet is the mount ecosystem's, whose grammar spells the names.
deleteCeiling :: DeleteCeiling Source #
The most versions one DeletePackageVersions call accepts.
Requests
listPackagesRequest :: CodeArtifactStore -> NamePrefix -> Maybe Text -> ListPackages Source #
One page of one bucket, continuing from a page token when there is one. packagePrefix
matches the package component alone and never a namespace, and the empty bucket filters nothing.
listVersionsRequest :: CodeArtifactStore -> PackageName -> Maybe Text -> ListPackageVersions Source #
List one page of a package's versions, continuing from a page token when there is one.
listVersionsResult :: Either Error ListPackageVersionsResponse -> Either StoreFault ListPackageVersionsResponse Source #
A missing package has an empty local inventory. Other service faults retain their retry advice.
deleteRequest :: CodeArtifactStore -> PackageName -> [Version] -> DeletePackageVersions Source #
Delete one chunk of a package's versions. The caller has already split the batch to
deleteCeiling, because CodeArtifact refuses a larger one outright.
describeRepositoryRequest :: CodeArtifactStore -> DescribeRepository Source #
Describe the repository, which carries both its ARN and its refill posture.
describeUpstreamRequest :: CodeArtifactStore -> RepositoryName -> DescribeRepository Source #
Describe another repository in the same domain, which is how the probe walks a chain.
listTagsRequest :: Text -> ListTagsForResource Source #
Read a repository's tags, which is where CodeArtifact carries the consent marker.
The walk cursor
cursorTagRequest :: Ecosystem -> Text -> NamePrefix -> TagResource Source #
Record a completed bucket. TagResource adds and updates the keys it names and replaces no
others, so this cannot disturb the consent tag beside it.
cursorUntagRequest :: Ecosystem -> Text -> UntagResource Source #
Forget the walk, which a completed one does.
cursorOfTags :: NameAlphabet -> Ecosystem -> [Tag] -> Maybe NamePrefix Source #
The bucket a repository's tags record, Nothing when none is recorded or when the recorded
one is no prefix this alphabet spells, which is how an alphabet change restarts the walk.
Responses
packagesOfPage :: Ecosystem -> [PackageSummary] -> [PackageName] Source #
The names in one listing page. CodeArtifact types a summary's package name optional, and an entry without one names nothing to sweep, so it is dropped rather than guessed at.
presenceOf :: PackageVersionStatus -> VersionPresence Source #
Whether the store still serves an install of a version in this status. Published and
Unlisted are the two statuses it does, and every other status is a record it keeps.
foldDeleteResponse :: [Version] -> DeletePackageVersionsResponse -> [(Version, VersionOutcome)] Source #
Read a delete response back against the versions submitted, so each gets one outcome. CodeArtifact may report a version neither way, which is a refusal, never a silent success.
classifyRepository :: RepositoryDescription -> StoreClass Source #
Whether deleting from this repository destroys anything. An external connection or an upstream serves a deleted version again from elsewhere, so neither is worth sweeping.
repositoryOfStore :: CodeArtifactStore -> RepositoryName Source #
The repository a store's coordinates name, where a probe of its chain starts.
upstreamLinksOf :: RepositoryDescription -> RepositoryLinks Source #
What one description says about the content it admits: the public registries it connects to, and the repositories it forwards a miss to. An entry the store named nothing in carries no name.
consentOfTags :: [Tag] -> ConsentVerdict Source #
Whether a repository's tags carry the consent marker.
repositoryOfResponse :: DescribeRepositoryResponse -> Either StoreFault RepositoryDescription Source #
The description DescribeRepository carried. It is optional on the wire, and a verdict
on a repository the store did not describe would be invented rather than read.
arnOfDescription :: RepositoryDescription -> Either StoreFault Text Source #
The repository ARN, which is how CodeArtifact addresses a tag read. It is optional on the wire, and without it there is no marker to read and so no verdict to give.
Consent marker
consentDescriptor :: Text Source #
How an operator attaches the marker, logged verbatim when consent is withheld.
Faults
classifyStoreFault :: Error -> StoreFault Source #
Classify an amazonka error for a maintenance call, refining the shared transport
classification, which reports a throttle and a denied permission as the same fault.
describeUpstreamRefusal :: Error -> UpstreamSafety Source #
Read a failed probe read. An identity that may not ask cannot clear the repository, so its refusal is an unsafe answer rather than a fault, and every other failure leaves the question open.
describeRepositoryGrant :: PermissionName Source #
The grant the probe needs on the private upstream and on every repository in its chain.