| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Registry
Description
Registry payloads and typed failures shared by the protocol capabilities. Read responses retain the HTTP status so metadata projection cannot erase access refusals.
Synopsis
- data RegistryResponse = RegistryResponse {}
- data BodyOutcome a
- = SuccessBody Int a
- | UnreadStatus Int
- isAuthorisationFailure :: Int -> Bool
- isSuccessStatus :: Int -> Bool
- data MirrorArtifact = MirrorArtifact {}
- firstHashValue :: HashAlg -> MirrorArtifact -> Maybe Text
- newtype ParseError = ParseError {}
- data FetchFault
- newtype PublishError = PublishError {}
- data PublishFault
- data UrlFormationError
- renderUrlFormationError :: UrlFormationError -> Text
- data PublishRelayResponse = PublishRelayResponse {}
Fetch payload
data RegistryResponse Source #
Upstream status and bytes retained before protocol decoding.
Constructors
| RegistryResponse | |
Fields
| |
Instances
| Show RegistryResponse Source # | |
Defined in Ecluse.Core.Registry Methods showsPrec :: Int -> RegistryResponse -> ShowS # show :: RegistryResponse -> String # showList :: [RegistryResponse] -> ShowS # | |
| Eq RegistryResponse Source # | |
Defined in Ecluse.Core.Registry Methods (==) :: RegistryResponse -> RegistryResponse -> Bool # (/=) :: RegistryResponse -> RegistryResponse -> Bool # | |
data BodyOutcome a Source #
The answer to a read that consumes only a 2xx body.
Constructors
| SuccessBody Int a | The 2xx status and the consumer's result. |
| UnreadStatus Int | A status outside 2xx. The consumer never ran, so no result exists. |
Instances
| Functor BodyOutcome Source # | |
Defined in Ecluse.Core.Registry Methods fmap :: (a -> b) -> BodyOutcome a -> BodyOutcome b # (<$) :: a -> BodyOutcome b -> BodyOutcome a # | |
| Show a => Show (BodyOutcome a) Source # | |
Defined in Ecluse.Core.Registry Methods showsPrec :: Int -> BodyOutcome a -> ShowS # show :: BodyOutcome a -> String # showList :: [BodyOutcome a] -> ShowS # | |
| Eq a => Eq (BodyOutcome a) Source # | |
Defined in Ecluse.Core.Registry Methods (==) :: BodyOutcome a -> BodyOutcome a -> Bool # (/=) :: BodyOutcome a -> BodyOutcome a -> Bool # | |
isAuthorisationFailure :: Int -> Bool Source #
Whether an upstream status explicitly refuses authentication or authorisation.
isSuccessStatus :: Int -> Bool Source #
Whether an upstream status reports success. Every leg reads this one test, so none can drift.
Publish descriptor
data MirrorArtifact Source #
The artifact descriptor the mirror publish uses.
Constructors
| MirrorArtifact | |
Fields
| |
Instances
| Show MirrorArtifact Source # | |
Defined in Ecluse.Core.Registry Methods showsPrec :: Int -> MirrorArtifact -> ShowS # show :: MirrorArtifact -> String # showList :: [MirrorArtifact] -> ShowS # | |
| Eq MirrorArtifact Source # | |
Defined in Ecluse.Core.Registry Methods (==) :: MirrorArtifact -> MirrorArtifact -> Bool # (/=) :: MirrorArtifact -> MirrorArtifact -> Bool # | |
firstHashValue :: HashAlg -> MirrorArtifact -> Maybe Text Source #
Errors
newtype ParseError Source #
A protocol decode failure for the caller to classify.
Constructors
| ParseError | |
Fields
| |
Instances
| Show ParseError Source # | |
Defined in Ecluse.Core.Registry Methods showsPrec :: Int -> ParseError -> ShowS # show :: ParseError -> String # showList :: [ParseError] -> ShowS # | |
| Eq ParseError Source # | |
Defined in Ecluse.Core.Registry | |
data FetchFault Source #
A request-formation, response-bound, or transport failure before a usable response.
Constructors
| FetchUrlUnformable UrlFormationError | The request URL could not be formed from the base URL and the package identity. |
| FetchBoundExceeded LimitError | The peer's body crossed the response-size bound, and the read refused it fail-closed. |
| FetchTransport TransportFault | The adapter classified a failed or interrupted exchange. |
Instances
| Show FetchFault Source # | |
Defined in Ecluse.Core.Registry Methods showsPrec :: Int -> FetchFault -> ShowS # show :: FetchFault -> String # showList :: [FetchFault] -> ShowS # | |
| Eq FetchFault Source # | |
Defined in Ecluse.Core.Registry | |
newtype PublishError Source #
Why publishing an artifact to a registry failed, the fault mpPublishArtifact reports.
Constructors
| PublishError | |
Fields
| |
Instances
| Show PublishError Source # | |
Defined in Ecluse.Core.Registry Methods showsPrec :: Int -> PublishError -> ShowS # show :: PublishError -> String # showList :: [PublishError] -> ShowS # | |
| Eq PublishError Source # | |
Defined in Ecluse.Core.Registry | |
data PublishFault Source #
Separate exchange faults from registry rejections so workers can choose retry or drop.
Constructors
| PublishFetch FetchFault | An exchange failure whose retry disposition follows the shared fetch-fault model. |
| PublishRejected PublishError | The registry answered and rejected the write (a non-2xx, non- |
| PublishSourceUnavailable Text | The writer had no usable source version object, so it formed no request. Not retryable. |
Instances
| Show PublishFault Source # | |
Defined in Ecluse.Core.Registry Methods showsPrec :: Int -> PublishFault -> ShowS # show :: PublishFault -> String # showList :: [PublishFault] -> ShowS # | |
| Eq PublishFault Source # | |
Defined in Ecluse.Core.Registry | |
data UrlFormationError Source #
Why an upstream request URL could not be formed from configuration and a parsed PackageName.
Constructors
| EmptyBaseUrl | The configured base URL is empty, so no request URL can be formed. |
| UnparseableUrl Text | The formed URL string could not be parsed into a request. Carries the offending URL. |
Instances
| Show UrlFormationError Source # | |
Defined in Ecluse.Core.Registry Methods showsPrec :: Int -> UrlFormationError -> ShowS # show :: UrlFormationError -> String # showList :: [UrlFormationError] -> ShowS # | |
| Eq UrlFormationError Source # | |
Defined in Ecluse.Core.Registry Methods (==) :: UrlFormationError -> UrlFormationError -> Bool # (/=) :: UrlFormationError -> UrlFormationError -> Bool # | |
renderUrlFormationError :: UrlFormationError -> Text Source #
Render a URL formation failure with its URL reduced to an authority, excluding userinfo and queries.
data PublishRelayResponse Source #
The response from the publication target after relaying a publish document.
Constructors
| PublishRelayResponse | |
Fields
| |
Instances
| Show PublishRelayResponse Source # | |
Defined in Ecluse.Core.Registry Methods showsPrec :: Int -> PublishRelayResponse -> ShowS # show :: PublishRelayResponse -> String # showList :: [PublishRelayResponse] -> ShowS # | |
| Eq PublishRelayResponse Source # | |
Defined in Ecluse.Core.Registry Methods (==) :: PublishRelayResponse -> PublishRelayResponse -> Bool # (/=) :: PublishRelayResponse -> PublishRelayResponse -> Bool # | |