singular-registry
LicenseApache-2.0
Safe HaskellNone
LanguageGHC2021

Singular.Registry.Page

Contents

Description

The page says which registry this is, which release it runs, what its rules are and what it holds now, from explicit inputs alone: the state token, the release, the rules from the state datum and the replayed facts. It reads no chain, file, clock, tip or session, so identical inputs give identical bytes. Pending requests render in one fixed order, by request output reference.

The text and the JSON carry the same facts: every key the JSON carries appears as a name: line in the text. The provenance line states what the page does not prove: the facts are state fields read from a replay checked from create, the indexer's answers are unverified claims, the release label is the archive's own claim, and the page is unsigned.

Synopsis

Release

data ReleaseInfo Source #

The release the page names: the archive's own claims.

Constructors

ReleaseInfo 

Fields

Instances

Instances details
Show ReleaseInfo Source # 
Instance details

Defined in Singular.Registry.Page

Methods

showsPrec :: Int -> ReleaseInfo -> ShowS Source #

show :: ReleaseInfo -> String Source #

showList :: [ReleaseInfo] -> ShowS Source #

Eq ReleaseInfo Source # 
Instance details

Defined in Singular.Registry.Page

Methods

(==) :: ReleaseInfo -> ReleaseInfo -> Bool Source #

(/=) :: ReleaseInfo -> ReleaseInfo -> Bool Source #

data ReleaseLinks Source #

Where the claimed version lives: never fetched, only computed.

Constructors

ReleaseLinks 

Fields

  • linkRelease :: Text

    The GitHub release page for tag v<version>

  • linkDocs :: Text

    The documentation asset of that release

Instances

releaseLinks :: ReleaseInfo -> ReleaseLinks Source #

The links for a release label, computed and never fetched.

blueprintSha :: ByteString -> Text Source #

Hex SHA-256 over blueprint file bytes.

parseVersionLabel :: Text -> Either PageRefusal Text Source #

A version label to its stripped self, or why it is none.

data PageRefusal Source #

Why no release label is printed.

Constructors

VersionMissing

No version.txt beside the blueprint

VersionUnreadable Text

version.txt cannot be read; the detail says why

VersionMalformed Text

version.txt is not a version label; the detail shows it

Instances

Instances details
Show PageRefusal Source # 
Instance details

Defined in Singular.Registry.Page

Methods

showsPrec :: Int -> PageRefusal -> ShowS Source #

show :: PageRefusal -> String Source #

showList :: [PageRefusal] -> ShowS Source #

Eq PageRefusal Source # 
Instance details

Defined in Singular.Registry.Page

Methods

(==) :: PageRefusal -> PageRefusal -> Bool Source #

(/=) :: PageRefusal -> PageRefusal -> Bool Source #

renderPageRefusal :: PageRefusal -> Text Source #

A refusal by name.

Page

data PageInputs Source #

Every fact the page renders, supplied by the caller.

Constructors

PageInputs 

Fields

Instances

Instances details
Show PageInputs Source # 
Instance details

Defined in Singular.Registry.Page

Methods

showsPrec :: Int -> PageInputs -> ShowS Source #

show :: PageInputs -> String Source #

showList :: [PageInputs] -> ShowS Source #

Eq PageInputs Source # 
Instance details

Defined in Singular.Registry.Page

Methods

(==) :: PageInputs -> PageInputs -> Bool Source #

(/=) :: PageInputs -> PageInputs -> Bool Source #

data Page Source #

A page: its inputs with pending requests in one fixed order, and its links.

Instances

Instances details
Show Page Source # 
Instance details

Defined in Singular.Registry.Page

Methods

showsPrec :: Int -> Page -> ShowS Source #

show :: Page -> String Source #

showList :: [Page] -> ShowS Source #

Eq Page Source # 
Instance details

Defined in Singular.Registry.Page

Methods

(==) :: Page -> Page -> Bool Source #

(/=) :: Page -> Page -> Bool Source #

describeRegistry :: PageInputs -> Page Source #

The page value for explicit inputs: total, sorting pending by request reference.

renderPageText :: Page -> Text Source #

The text rendering: every JSON key as a name: line, same facts as the JSON.

renderPageJson :: Page -> Value Source #

The JSON rendering: a receipt-shaped object with the page sections.