| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ecluse.Core.Registry.PyPI.Wire
Description
Decode PEP 691 metadata with per-entry drops. Raw array positions survive malformed entries so admission and assembly identify the same files.
Synopsis
- simpleIndexMediaType :: ByteString
- data SimpleIndex = SimpleIndex {
- siName :: Text
- siFiles :: [IndexFile]
- siInvalidEntries :: [InvalidEntry]
- checkApiVersion :: Object -> Parser ()
- data IndexFile = IndexFile {
- ifEntryKey :: EntryKey
- ifFilename :: Text
- ifUrl :: Text
- ifHashes :: Map Text Text
- ifRequiresPython :: Maybe Text
- ifSize :: Maybe Int
- ifUploadTime :: Maybe UTCTime
- ifYanked :: YankState
- ifProvenance :: Maybe Text
- data YankState
- decodeIndexFiles :: [(Int, Value)] -> ([IndexFile], [InvalidEntry])
The media type this shape travels under
simpleIndexMediaType :: ByteString Source #
The PEP 691 media type used for index requests and responses.
The Simple index
data SimpleIndex Source #
A project's index records malformed file and version entries as drops.
Constructors
| SimpleIndex | |
Fields
| |
Instances
| FromJSON SimpleIndex Source # | |
Defined in Ecluse.Core.Registry.PyPI.Wire | |
| Show SimpleIndex Source # | |
Defined in Ecluse.Core.Registry.PyPI.Wire Methods showsPrec :: Int -> SimpleIndex -> ShowS # show :: SimpleIndex -> String # showList :: [SimpleIndex] -> ShowS # | |
| Eq SimpleIndex Source # | |
Defined in Ecluse.Core.Registry.PyPI.Wire | |
checkApiVersion :: Object -> Parser () Source #
Refuse malformed or unsupported API declarations. An absent declaration uses the supported API.
One distribution file
A distribution file encodes its release in ifFilename.
Constructors
| IndexFile | |
Fields
| |
A PEP 592 yank withdraws a file from ranges while allowing exact pins.
Constructors
| FileOffered | The file resolves normally. |
| FileWithdrawn (Maybe Text) | The file is withdrawn from resolution, with the reason the index gave. |
decodeIndexFiles :: [(Int, Value)] -> ([IndexFile], [InvalidEntry]) Source #
Decode indexed files without renumbering entries that survive lenient parsing.