| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Osv.Publication.Envelope
Description
The publication state as S3 user metadata, written in the same request as the artifact.
A metadata-only read returns it, so Pilot orders and sizes a publication without downloading the stored database. Every value is printable ASCII, and the envelope stays under S3's user-metadata limit. A missing key, an unknown version, and a bad value are distinct faults, so an object that predates guarded publication never reads as an empty store.
Synopsis
- envelopeVersion :: Text
- maxEnvelopeBytes :: Int
- encodeEnvelope :: PublishedState -> Either EnvelopeFault [(Text, Text)]
- decodeEnvelope :: [(Text, Text)] -> Either EnvelopeFault PublishedState
Documentation
envelopeVersion :: Text Source #
The envelope layout this build writes, and the only one it reads.
maxEnvelopeBytes :: Int Source #
S3's user-metadata limit: the UTF-8 bytes of every key and value together.
encodeEnvelope :: PublishedState -> Either EnvelopeFault [(Text, Text)] Source #
Render the state for a write. A value outside printable ASCII, or a state past the limit, is refused.
decodeEnvelope :: [(Text, Text)] -> Either EnvelopeFault PublishedState Source #
Read the state a stored object carries. Keys compare without case, as S3 may return them in any.