ecluse:ecluse-core
Safe HaskellNone
LanguageGHC2021

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

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

  • siName :: Text

    The project name the index reports, verbatim. Empty when the key is absent.

  • siFiles :: [IndexFile]

    The offered distribution files, in the order the index listed them.

  • siInvalidEntries :: [InvalidEntry]

    The malformed files and versions entries the decode dropped.

checkApiVersion :: Object -> Parser () Source #

Refuse malformed or unsupported API declarations. An absent declaration uses the supported API.

One distribution file

data IndexFile Source #

A distribution file encodes its release in ifFilename.

Constructors

IndexFile 

Fields

data YankState Source #

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.

Instances

Instances details
Show YankState Source # 
Instance details

Defined in Ecluse.Core.Registry.PyPI.Wire

Eq YankState Source # 
Instance details

Defined in Ecluse.Core.Registry.PyPI.Wire

decodeIndexFiles :: [(Int, Value)] -> ([IndexFile], [InvalidEntry]) Source #

Decode indexed files without renumbering entries that survive lenient parsing.