| License | Apache-2.0 |
|---|---|
| Safe Haskell | None |
| Language | GHC2021 |
Singular.Registry.Page
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
- data ReleaseInfo = ReleaseInfo {
- releaseVersion :: Text
- releaseBlueprintTitle :: Text
- releaseBlueprintSha :: Text
- releaseApplicationHash :: Text
- data ReleaseLinks = ReleaseLinks {
- linkRelease :: Text
- linkDocs :: Text
- releaseLinks :: ReleaseInfo -> ReleaseLinks
- blueprintSha :: ByteString -> Text
- parseVersionLabel :: Text -> Either PageRefusal Text
- data PageRefusal
- = VersionMissing
- | VersionUnreadable Text
- | VersionMalformed Text
- renderPageRefusal :: PageRefusal -> Text
- data PageInputs = PageInputs {
- pageStateToken :: Text
- pageStateOutput :: Text
- pageStateScript :: Text
- pageApplicationScript :: Text
- pageActiveScript :: Text
- pageAbsentScript :: Text
- pageTerminalScript :: Text
- pageRelease :: ReleaseInfo
- pageProcessTime :: Integer
- pageRetractTime :: Integer
- pageTip :: Integer
- pageMaxKeyBytes :: Int
- pageRoot :: Text
- pageActiveKeys :: Int
- pageTerminalKeys :: Int
- pageFoldsSinceCreate :: Int
- pageCreateTransaction :: Text
- pageLastFold :: Maybe Text
- pagePendingRequests :: [Value]
- data Page
- describeRegistry :: PageInputs -> Page
- renderPageText :: Page -> Text
- renderPageJson :: Page -> Value
Release
data ReleaseInfo Source #
The release the page names: the archive's own claims.
Constructors
| ReleaseInfo | |
Fields
| |
Instances
| Show ReleaseInfo Source # | |
Defined in Singular.Registry.Page Methods showsPrec :: Int -> ReleaseInfo -> ShowS Source # show :: ReleaseInfo -> String Source # showList :: [ReleaseInfo] -> ShowS Source # | |
| Eq ReleaseInfo Source # | |
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
| |
Instances
| Show ReleaseLinks Source # | |
Defined in Singular.Registry.Page Methods showsPrec :: Int -> ReleaseLinks -> ShowS Source # show :: ReleaseLinks -> String Source # showList :: [ReleaseLinks] -> ShowS Source # | |
| Eq ReleaseLinks Source # | |
Defined in Singular.Registry.Page Methods (==) :: ReleaseLinks -> ReleaseLinks -> Bool Source # (/=) :: ReleaseLinks -> ReleaseLinks -> Bool Source # | |
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 |
| VersionUnreadable Text |
|
| VersionMalformed Text |
|
Instances
| Show PageRefusal Source # | |
Defined in Singular.Registry.Page Methods showsPrec :: Int -> PageRefusal -> ShowS Source # show :: PageRefusal -> String Source # showList :: [PageRefusal] -> ShowS Source # | |
| Eq PageRefusal Source # | |
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
| Show PageInputs Source # | |
Defined in Singular.Registry.Page Methods showsPrec :: Int -> PageInputs -> ShowS Source # show :: PageInputs -> String Source # showList :: [PageInputs] -> ShowS Source # | |
| Eq PageInputs Source # | |
Defined in Singular.Registry.Page Methods (==) :: PageInputs -> PageInputs -> Bool Source # (/=) :: PageInputs -> PageInputs -> Bool Source # | |
A page: its inputs with pending requests in one fixed order, and its links.
Instances
| Show Page Source # | |
Defined in Singular.Registry.Page | |
| Eq Page Source # | |
Defined in Singular.Registry.Page | |
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.