| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Osv.Publication.Types
Description
The vocabulary of guarded advisory publication, shared by the compile that gathers a candidate's facts, the decision in Ecluse.Core.Osv.Publication, and the stored metadata in Ecluse.Core.Osv.Publication.Envelope.
Synopsis
- data SourceIdentity
- sourceIdentityOf :: Text -> SourceIdentity
- sourceIdentityHex :: SourceIdentity -> Text
- parseSourceIdentityHex :: Text -> Maybe SourceIdentity
- data SourceDigest
- sourceDigestOf :: ContentDigest -> SourceDigest
- sourceDigestHex :: SourceDigest -> Text
- parseSourceDigestHex :: Text -> Maybe SourceDigest
- data SourceMarker = SourceMarker {}
- lastModifiedAllowance :: NominalDiffTime
- usableLastModified :: UTCTime -> Maybe UTCTime -> Maybe UTCTime
- data PublicationNonce
- newPublicationNonce :: MonadIO m => m PublicationNonce
- renderPublicationNonce :: PublicationNonce -> Text
- parsePublicationNonce :: Text -> Maybe PublicationNonce
- newtype ObjectRevision = ObjectRevision Text
- data CandidateFacts = CandidateFacts {}
- data PublishedState = PublishedState {}
- data Adjustment
- renderAdjustment :: Adjustment -> Text
- data EnvelopeFault
- renderEnvelopeFault :: EnvelopeFault -> Text
- data StoreObservation
- data Percent
- mkPercent :: Rational -> Maybe Percent
- unPercent :: Percent -> Rational
- renderPercent :: Percent -> Text
- data ShrinkPolicy = ShrinkPolicy {}
- data BaselineCapability
- renderBaselineCapability :: BaselineCapability -> Text
- data Rebaseline = Rebaseline {}
- epssBytesPerScoredRow :: Integer
Source evidence
data SourceIdentity Source #
A source's fixed-width identity: the SHA-256 of its credential-free URL.
Instances
| Show SourceIdentity Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods showsPrec :: Int -> SourceIdentity -> ShowS # show :: SourceIdentity -> String # showList :: [SourceIdentity] -> ShowS # | |
| Eq SourceIdentity Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods (==) :: SourceIdentity -> SourceIdentity -> Bool # (/=) :: SourceIdentity -> SourceIdentity -> Bool # | |
sourceIdentityOf :: Text -> SourceIdentity Source #
Identify a source by its credential-free URL (credentialFreeUrl).
sourceIdentityHex :: SourceIdentity -> Text Source #
The identity's lowercase hex.
parseSourceIdentityHex :: Text -> Maybe SourceIdentity Source #
Read an identity back from its lowercase hex.
data SourceDigest Source #
The SHA-256 of one complete source response body, before Pilot decompresses it.
Instances
| Show SourceDigest Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods showsPrec :: Int -> SourceDigest -> ShowS # show :: SourceDigest -> String # showList :: [SourceDigest] -> ShowS # | |
| Eq SourceDigest Source # | |
Defined in Ecluse.Core.Osv.Publication.Types | |
sourceDigestOf :: ContentDigest -> SourceDigest Source #
The digest of a fetch that read its source to the end (digestWhole).
sourceDigestHex :: SourceDigest -> Text Source #
The digest's lowercase hex.
parseSourceDigestHex :: Text -> Maybe SourceDigest Source #
Read a digest back from its lowercase hex.
data SourceMarker Source #
One source's snapshot. A digest proves equal bytes only, so only Last-Modified orders two snapshots.
Constructors
| SourceMarker | |
Fields
| |
Instances
| Show SourceMarker Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods showsPrec :: Int -> SourceMarker -> ShowS # show :: SourceMarker -> String # showList :: [SourceMarker] -> ShowS # | |
| Eq SourceMarker Source # | |
Defined in Ecluse.Core.Osv.Publication.Types | |
lastModifiedAllowance :: NominalDiffTime Source #
Five minutes: how far past the run's clock a source's Last-Modified may sit. It bounds input and never orders.
usableLastModified :: UTCTime -> Maybe UTCTime -> Maybe UTCTime Source #
A Last-Modified as ordering evidence. One later than the run's clock plus lastModifiedAllowance counts as missing.
Revisions
data PublicationNonce Source #
A fixed-width value inside each attempted artifact. An ETag follows content, so this gives every publication its own revision.
Instances
| Show PublicationNonce Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods showsPrec :: Int -> PublicationNonce -> ShowS # show :: PublicationNonce -> String # showList :: [PublicationNonce] -> ShowS # | |
| Eq PublicationNonce Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods (==) :: PublicationNonce -> PublicationNonce -> Bool # (/=) :: PublicationNonce -> PublicationNonce -> Bool # | |
newPublicationNonce :: MonadIO m => m PublicationNonce Source #
A fresh nonce of 128 random bits.
renderPublicationNonce :: PublicationNonce -> Text Source #
The nonce's stored form: 32 lowercase hex digits.
parsePublicationNonce :: Text -> Maybe PublicationNonce Source #
Read a nonce back from its stored form.
newtype ObjectRevision Source #
An object store's revision of the stored artifact, its ETag as the store reported it.
Constructors
| ObjectRevision Text |
Instances
| Show ObjectRevision Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods showsPrec :: Int -> ObjectRevision -> ShowS # show :: ObjectRevision -> String # showList :: [ObjectRevision] -> ShowS # | |
| Eq ObjectRevision Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods (==) :: ObjectRevision -> ObjectRevision -> Bool # (/=) :: ObjectRevision -> ObjectRevision -> Bool # | |
What a publication compares
data CandidateFacts Source #
What one compile learned. It claims nothing about the stored predecessor.
Constructors
| CandidateFacts | |
Fields
| |
Instances
| Show CandidateFacts Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods showsPrec :: Int -> CandidateFacts -> ShowS # show :: CandidateFacts -> String # showList :: [CandidateFacts] -> ShowS # | |
| Eq CandidateFacts Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods (==) :: CandidateFacts -> CandidateFacts -> Bool # (/=) :: CandidateFacts -> CandidateFacts -> Bool # | |
data PublishedState Source #
The publication state an accepted artifact carries beside it in the store.
Constructors
| PublishedState | |
Fields
| |
Instances
| Show PublishedState Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods showsPrec :: Int -> PublishedState -> ShowS # show :: PublishedState -> String # showList :: [PublishedState] -> ShowS # | |
| Eq PublishedState Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods (==) :: PublishedState -> PublishedState -> Bool # (/=) :: PublishedState -> PublishedState -> Bool # | |
data Adjustment Source #
How a publication set the size baseline it records.
Constructors
| InitialBaseline | The first publication under this object key, which starts the baseline at its own size. |
| OrdinaryBaseline | An ordinary publication, with no EPSS credit in force. |
| EpssOutageCredit | A publication measured with an EPSS outage credit in force. |
| OperatorRebaseline | An operator's one-shot rebaseline, which resets the baseline to this artifact's size. |
Instances
renderAdjustment :: Adjustment -> Text Source #
The adjustment's stored and logged spelling.
data EnvelopeFault Source #
Why the stored object's publication metadata cannot be read as a predecessor.
Constructors
| EnvelopeMissing (NonEmpty Text) | The object carries none of these metadata keys. |
| EnvelopeUnsupported Text | The metadata names a publication version this build does not read. |
| EnvelopeMalformed Text | This key's value does not parse, or contradicts another key. |
| EnvelopeTooLarge Int | The metadata passes the store's size limit, in bytes. |
Instances
| Show EnvelopeFault Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods showsPrec :: Int -> EnvelopeFault -> ShowS # show :: EnvelopeFault -> String # showList :: [EnvelopeFault] -> ShowS # | |
| Eq EnvelopeFault Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods (==) :: EnvelopeFault -> EnvelopeFault -> Bool # (/=) :: EnvelopeFault -> EnvelopeFault -> Bool # | |
renderEnvelopeFault :: EnvelopeFault -> Text Source #
The fault as an operator reads it.
data StoreObservation Source #
What one metadata-only read of the destination found.
Constructors
| StoreAbsent | No object holds the key. |
| StorePresent ObjectRevision Integer (Either EnvelopeFault PublishedState) | An object holds the key, with its revision, its size in bytes, and its decoded metadata. |
Instances
| Show StoreObservation Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods showsPrec :: Int -> StoreObservation -> ShowS # show :: StoreObservation -> String # showList :: [StoreObservation] -> ShowS # | |
| Eq StoreObservation Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods (==) :: StoreObservation -> StoreObservation -> Bool # (/=) :: StoreObservation -> StoreObservation -> Bool # | |
Policy
A share of a size, from 0 to 100 percent, held exactly.
mkPercent :: Rational -> Maybe Percent Source #
A percentage from 0 to 100. Anything outside that range is Nothing.
renderPercent :: Percent -> Text Source #
The percentage as an operator reads it.
data ShrinkPolicy Source #
The configured shrink limits a publication is held to.
Constructors
| ShrinkPolicy | |
Fields
| |
Instances
| Show ShrinkPolicy Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods showsPrec :: Int -> ShrinkPolicy -> ShowS # show :: ShrinkPolicy -> String # showList :: [ShrinkPolicy] -> ShowS # | |
| Eq ShrinkPolicy Source # | |
Defined in Ecluse.Core.Osv.Publication.Types | |
data BaselineCapability Source #
The size baseline a store can keep. A weaker store declares it, and an outage never selects it.
Constructors
| DurableBaseline | The high-water size travels with each object, so no history read is needed. |
| PreviousObjectBaseline | Only the previous object's own size is known. |
| NoBaseline | No size is known, so no shrink check runs. |
Instances
| Show BaselineCapability Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods showsPrec :: Int -> BaselineCapability -> ShowS # show :: BaselineCapability -> String # showList :: [BaselineCapability] -> ShowS # | |
| Eq BaselineCapability Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods (==) :: BaselineCapability -> BaselineCapability -> Bool # (/=) :: BaselineCapability -> BaselineCapability -> Bool # | |
renderBaselineCapability :: BaselineCapability -> Text Source #
The capability as the posture line and the publication log read it.
data Rebaseline Source #
An operator's one-shot approval to reset the baseline, bound to the predecessor it names.
Constructors
| Rebaseline | |
Fields
| |
Instances
| Show Rebaseline Source # | |
Defined in Ecluse.Core.Osv.Publication.Types Methods showsPrec :: Int -> Rebaseline -> ShowS # show :: Rebaseline -> String # showList :: [Rebaseline] -> ShowS # | |
| Eq Rebaseline Source # | |
Defined in Ecluse.Core.Osv.Publication.Types | |
epssBytesPerScoredRow :: Integer Source #
The bytes one scored range row adds over an unscored one, measured on the shipped table layout.