client

package
v1.30.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2026 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package client provides primitives to interact with the openapi HTTP API.

Code generated by github.com/oapi-codegen/oapi-codegen/v2 version v2.8.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAdvanceDevClockRequest

func NewAdvanceDevClockRequest(server string, body AdvanceDevClockJSONRequestBody) (*http.Request, error)

NewAdvanceDevClockRequest calls the generic AdvanceDevClock builder with application/json body

func NewAdvanceDevClockRequestWithBody

func NewAdvanceDevClockRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewAdvanceDevClockRequestWithBody constructs an http.Request for the AdvanceDevClock method, with any body, and a specified content type

func NewCancelVerificationRequest

func NewCancelVerificationRequest(server string, reportId string) (*http.Request, error)

NewCancelVerificationRequest constructs an http.Request for the CancelVerification method

func NewContributeRequestWithBody

func NewContributeRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewContributeRequestWithBody constructs an http.Request for the Contribute method, with any body, and a specified content type

func NewDeleteVerificationRequest

func NewDeleteVerificationRequest(server string, reportId string) (*http.Request, error)

NewDeleteVerificationRequest constructs an http.Request for the DeleteVerification method

func NewGetArchiveClaimContentRequest

func NewGetArchiveClaimContentRequest(server string, id ClaimId) (*http.Request, error)

NewGetArchiveClaimContentRequest constructs an http.Request for the GetArchiveClaimContent method

func NewGetArchiveClaimRequest

func NewGetArchiveClaimRequest(server string, id ClaimId) (*http.Request, error)

NewGetArchiveClaimRequest constructs an http.Request for the GetArchiveClaim method

func NewGetArchiveInfoRequest

func NewGetArchiveInfoRequest(server string) (*http.Request, error)

NewGetArchiveInfoRequest constructs an http.Request for the GetArchiveInfo method

func NewGetBranchClaimContentRequest

func NewGetBranchClaimContentRequest(server string, branch BranchName, id ClaimId) (*http.Request, error)

NewGetBranchClaimContentRequest constructs an http.Request for the GetBranchClaimContent method

func NewGetBranchClaimRequest

func NewGetBranchClaimRequest(server string, branch BranchName, id ClaimId) (*http.Request, error)

NewGetBranchClaimRequest constructs an http.Request for the GetBranchClaim method

func NewGetBranchHeadRequest

func NewGetBranchHeadRequest(server string, branch BranchName) (*http.Request, error)

NewGetBranchHeadRequest constructs an http.Request for the GetBranchHead method

func NewGetBranchInfoRequest

func NewGetBranchInfoRequest(server string, branch BranchName) (*http.Request, error)

NewGetBranchInfoRequest constructs an http.Request for the GetBranchInfo method

func NewGetClaimContentRequest

func NewGetClaimContentRequest(server string, id ClaimId) (*http.Request, error)

NewGetClaimContentRequest constructs an http.Request for the GetClaimContent method

func NewGetClaimRequest

func NewGetClaimRequest(server string, id ClaimId) (*http.Request, error)

NewGetClaimRequest constructs an http.Request for the GetClaim method

func NewGetVerificationRequest

func NewGetVerificationRequest(server string, reportId string) (*http.Request, error)

NewGetVerificationRequest constructs an http.Request for the GetVerification method

func NewHealthRequest

func NewHealthRequest(server string) (*http.Request, error)

NewHealthRequest constructs an http.Request for the Health method

func NewListBranchesRequest

func NewListBranchesRequest(server string) (*http.Request, error)

NewListBranchesRequest constructs an http.Request for the ListBranches method

func NewListStorageLayersRequest

func NewListStorageLayersRequest(server string) (*http.Request, error)

NewListStorageLayersRequest constructs an http.Request for the ListStorageLayers method

func NewListVerificationsRequest

func NewListVerificationsRequest(server string) (*http.Request, error)

NewListVerificationsRequest constructs an http.Request for the ListVerifications method

func NewQueryRequest

func NewQueryRequest(server string, body QueryJSONRequestBody) (*http.Request, error)

NewQueryRequest calls the generic Query builder with application/json body

func NewQueryRequestWithBody

func NewQueryRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewQueryRequestWithBody constructs an http.Request for the Query method, with any body, and a specified content type

func NewStartVerificationRequest

func NewStartVerificationRequest(server string, body StartVerificationJSONRequestBody) (*http.Request, error)

NewStartVerificationRequest calls the generic StartVerification builder with application/json body

func NewStartVerificationRequestWithBody

func NewStartVerificationRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error)

NewStartVerificationRequestWithBody constructs an http.Request for the StartVerification method, with any body, and a specified content type

func NewWhoamiRequest

func NewWhoamiRequest(server string) (*http.Request, error)

NewWhoamiRequest constructs an http.Request for the Whoami method

Types

type AdvanceDevClockJSONRequestBody

type AdvanceDevClockJSONRequestBody = DevClockAdvance

AdvanceDevClockJSONRequestBody defines body for AdvanceDevClock for application/json ContentType.

type AdvanceDevClockResponse

type AdvanceDevClockResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *DevClock
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON501 the response for an HTTP 501 `application/json` response
	JSON501 *NotImplemented
}

func ParseAdvanceDevClockResponse

func ParseAdvanceDevClockResponse(rsp *http.Response) (*AdvanceDevClockResponse, error)

ParseAdvanceDevClockResponse parses an HTTP response from a AdvanceDevClockWithResponse call

func (AdvanceDevClockResponse) ContentType

func (r AdvanceDevClockResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (AdvanceDevClockResponse) GetBody

func (r AdvanceDevClockResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (AdvanceDevClockResponse) GetJSON200

func (r AdvanceDevClockResponse) GetJSON200() *DevClock

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (AdvanceDevClockResponse) GetJSON400

func (r AdvanceDevClockResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (AdvanceDevClockResponse) GetJSON401

func (r AdvanceDevClockResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (AdvanceDevClockResponse) GetJSON403

func (r AdvanceDevClockResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (AdvanceDevClockResponse) GetJSON501

func (r AdvanceDevClockResponse) GetJSON501() *NotImplemented

GetJSON501 returns the response for an HTTP 501 `application/json` response

func (AdvanceDevClockResponse) Status

func (r AdvanceDevClockResponse) Status() string

Status returns HTTPResponse.Status

func (AdvanceDevClockResponse) StatusCode

func (r AdvanceDevClockResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ArchiveInfo

type ArchiveInfo struct {
	// Branches How many branches the table holds.
	Branches int `json:"branches"`

	// Head The branch-table head id — the root of every `$archive`-scoped read, and the
	// only place this contract reports it.
	Head string `json:"head"`

	// Height The branch-table head claim's generation number.
	Height int64 `json:"height"`

	// UpdatedAt The branch-table head's `created_at` — when the archive last moved.
	UpdatedAt time.Time `json:"updatedAt"`
}

ArchiveInfo defines model for ArchiveInfo.

type BadRequest

type BadRequest = Error

BadRequest defines model for BadRequest.

type BranchEntry

type BranchEntry struct {
	// Head That branch's current head claim id.
	Head string `json:"head"`

	// Name The branch name, as the branch table holds it.
	Name string `json:"name"`
}

BranchEntry defines model for BranchEntry.

type BranchHead

type BranchHead struct {
	// Head The content-addressed head claim id.
	Head string `json:"head"`
}

BranchHead defines model for BranchHead.

type BranchInfo

type BranchInfo struct {
	// Head The content-addressed head claim id.
	Head string `json:"head"`

	// Height The head claim's generation number (§4.1) — 0 on an initial node, else
	// 1 + max over what it references. The depth of what the branch points at.
	Height int64 `json:"height"`

	// Name The branch name, as the branch table holds it.
	Name string `json:"name"`

	// UpdatedAt The head claim's `created_at` — when the branch last moved. Soft: a
	// contributor writes it, so it is not the witnessed merge time.
	UpdatedAt time.Time `json:"updatedAt"`
}

BranchInfo defines model for BranchInfo.

type BranchList

type BranchList struct {
	// Branches Every branch the branch table holds, from one archive snapshot — so the
	// heads are consistent with each other. Empty on an archive with no branches.
	Branches []BranchEntry `json:"branches"`
}

BranchList defines model for BranchList.

type BranchName

type BranchName = string

BranchName defines model for BranchName.

type CancelVerificationResponse

type CancelVerificationResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *VerificationReport
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
}

func ParseCancelVerificationResponse

func ParseCancelVerificationResponse(rsp *http.Response) (*CancelVerificationResponse, error)

ParseCancelVerificationResponse parses an HTTP response from a CancelVerificationWithResponse call

func (CancelVerificationResponse) ContentType

func (r CancelVerificationResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (CancelVerificationResponse) GetBody

func (r CancelVerificationResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (CancelVerificationResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (CancelVerificationResponse) GetJSON401

func (r CancelVerificationResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (CancelVerificationResponse) GetJSON403

func (r CancelVerificationResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (CancelVerificationResponse) GetJSON404

func (r CancelVerificationResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (CancelVerificationResponse) Status

Status returns HTTPResponse.Status

func (CancelVerificationResponse) StatusCode

func (r CancelVerificationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ClaimId

type ClaimId = string

ClaimId defines model for ClaimId.

type Client

type Client struct {
	// The endpoint of the server conforming to this interface, with scheme,
	// https://api.deepmap.com for example. This can contain a path relative
	// to the server, such as https://api.deepmap.com/dev-test, and all the
	// paths in the swagger spec will be appended to the server.
	Server string

	// Doer for performing requests, typically a *http.Client with any
	// customized settings, such as certificate chains.
	Client HttpRequestDoer

	// A list of callbacks for modifying requests which are generated before sending over
	// the network.
	RequestEditors []RequestEditorFn
}

Client which conforms to the OpenAPI3 specification for this service.

func NewClient

func NewClient(server string, opts ...ClientOption) (*Client, error)

Creates a new Client, with reasonable defaults

func (*Client) AdvanceDevClock

func (c *Client) AdvanceDevClock(ctx context.Context, body AdvanceDevClockJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

AdvanceDevClock Advance the dev sequencer's clock

Available **only** when the stack was launched with `--dev` against a `dev` Sequencer: moves the clock the Sequencer mints `created_at` and branch-table timestamps from forward to (at least) the given instant, so a client that knows its own story's schedule — a fixture generator, say — can make the archive's *recorded* history track its *narrated* one, one contribution at a time, rather than every merge landing at the real wall-clock moment the client happened to run.

The clock never moves backward: a request older than its current position is accepted and answered with the position unchanged. Absent `--dev`, or against a `concurrent` (production) Sequencer, the route is `501` — the witnessed merge time stays real, which is the whole point of `R-C2DATE`.

Takes a body of the `application/json` content type.

Corresponds with POST /dev/clock (the `AdvanceDevClock` operationId).

func (*Client) AdvanceDevClockWithBody

func (c *Client) AdvanceDevClockWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

AdvanceDevClockWithBody Advance the dev sequencer's clock

Available **only** when the stack was launched with `--dev` against a `dev` Sequencer: moves the clock the Sequencer mints `created_at` and branch-table timestamps from forward to (at least) the given instant, so a client that knows its own story's schedule — a fixture generator, say — can make the archive's *recorded* history track its *narrated* one, one contribution at a time, rather than every merge landing at the real wall-clock moment the client happened to run.

The clock never moves backward: a request older than its current position is accepted and answered with the position unchanged. Absent `--dev`, or against a `concurrent` (production) Sequencer, the route is `501` — the witnessed merge time stays real, which is the whole point of `R-C2DATE`.

Takes any type of body and a specified content type.

Corresponds with POST /dev/clock (the `AdvanceDevClock` operationId).

func (*Client) CancelVerification

func (c *Client) CancelVerification(ctx context.Context, reportId string, reqEditors ...RequestEditorFn) (*http.Response, error)

CancelVerification Cancel a running verification run

Stops a `running` run but **keeps** its report: the record stays in history with `status` `stopped` and whatever partial findings it had gathered, and the concurrency slot is freed. Use this to abort a run you want to keep a record of; use `DELETE` to remove it entirely. Idempotent — cancelling a run that has already finished or stopped returns its current report unchanged.

Corresponds with POST /system/verifications/{reportId}/cancel (the `CancelVerification` operationId).

func (*Client) ContributeWithBody

func (c *Client) ContributeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

ContributeWithBody Contribute signed claims (atomic)

Contributes one or more signed claims to a branch as a single **atomic** merge — all are absorbed under one new branch-table head, or none are. Content-addressed and therefore **idempotent**: re-contributing yields the same ids with no duplicates.

The body is ranke's contribution stream: a **CBOR sequence** (RFC 8742) of records, self-framing so a contribution of any size streams.

  • `[2, ["<branch>", …]]` — **first**, the branches this contribution touches
  • `[0, <id>, <claim bytes>, "<branch>"]` — a claim, as the canonical CBOR its contributor signed, and the branch it joins
  • `[1, <hash>, <content bytes>]` — externalized content, which lives in the Universe unbranched and so names no branch

The header comes first so the **C** right is settled on every declared branch before any of the body is read; a claim naming an undeclared branch is refused, so the declaration binds. One contribution may therefore advance **several branches**, and an unauthorized one is answered without its payload being read.

Payloads are CBOR byte strings carried through untouched: a claim's id is a signature over exactly those bytes, so the server stores what it was sent. The id is explicit because it cannot be derived — `Sign(H(S(node)))` is made with the contributor's key, and the canonical encoding carries only the node. Content is checked against the hash addressing it.

Send every claim the closure needs that the archive may not hold yet — a first-time contributor includes its own `contribution/contributor` claim, since everything it signs references it.

The sequencer mints the `contribution/branches` branch-table claim recording the merge (paper 02 §Sequencer). On success the new branch-table head id and the contributed claim ids are returned.

Takes any type of body and a specified content type.

Corresponds with POST /contribute (the `Contribute` operationId).

func (*Client) DeleteVerification

func (c *Client) DeleteVerification(ctx context.Context, reportId string, reqEditors ...RequestEditorFn) (*http.Response, error)

DeleteVerification Delete a verification run

Really deletes the run and its report. If the run is still `running` it is stopped first, then the record is removed — so this both aborts a run and cleans up finished history in one step. Unlike the cancel action, nothing survives: a subsequent `GET` is `404`. Either verb frees a concurrency slot; cancel keeps the report, delete removes it.

Corresponds with DELETE /system/verifications/{reportId} (the `DeleteVerification` operationId).

func (*Client) GetArchiveClaim

func (c *Client) GetArchiveClaim(ctx context.Context, id ClaimId, reqEditors ...RequestEditorFn) (*http.Response, error)

GetArchiveClaim Fetch a claim within the archive head's closure

Returns claim `{id}` as its signed CBOR bytes if it lies in the closure of the **whole Ranke-Archive** — the current branch-table head — whichever branch holds it. A client reaches a claim without naming the branch it is on; a claim outside that closure returns `404`.

This collection reads the `$archive` scope: the same scope a RankeQL body names as `select.branch: "$archive"`, and the same target a grant is written against. It requires the **R** right on `$archive`.

Immutably cacheable by id.

Corresponds with GET /archive/claims/{id} (the `GetArchiveClaim` operationId).

func (*Client) GetArchiveClaimContent

func (c *Client) GetArchiveClaimContent(ctx context.Context, id ClaimId, reqEditors ...RequestEditorFn) (*http.Response, error)

GetArchiveClaimContent Fetch the content of a claim within the archive head's closure

Streams the content of claim `{id}` if it lies in the archive head's closure, across every branch (same closure guarantee as the claim itself; outside it or unknown → `404`). Reads the `$archive` scope and requires **R** on `$archive`. Content is addressed by the claim; whether the bytes are inline or a separate blob is hidden. Immutably cacheable by the claim id.

Corresponds with GET /archive/claims/{id}/content (the `GetArchiveClaimContent` operationId).

func (*Client) GetArchiveInfo

func (c *Client) GetArchiveInfo(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

GetArchiveInfo What is known about the archive

Reports the Ranke-Archive as a whole: the **branch-table head** — the id every archive-scoped read is rooted at — with its height and when it last moved, and how many branches the table holds.

This is the only route that reports the branch-table head, which is what a client needs to name the `$archive` scope in a query or a grant.

Reads the `$archive` scope and requires the **R** right on `$archive`. Cacheable **with revalidation**: the head advances on every contribution.

Corresponds with GET /archive/info (the `GetArchiveInfo` operationId).

func (*Client) GetBranchClaim

func (c *Client) GetBranchClaim(ctx context.Context, branch BranchName, id ClaimId, reqEditors ...RequestEditorFn) (*http.Response, error)

GetBranchClaim Fetch a claim within a branch's closure

Returns claim `{id}` as its signed CBOR bytes, **only if it lies in branch `{branch}`'s closure**. A claim that is superseded, contradicted, or otherwise outside the closure returns `404`, indistinguishable from one that does not exist. Requires the **R** right on that branch.

`{branch}` names an **ordinary branch**. A reserved scope name supplied here names a branch that does not exist and is answered as `404`; each scope has exactly one route (`/archive/…`, `/universe/…`).

Immutably **cacheable** by id (strong `ETag`, `Cache-Control: public, immutable`): the id content-addresses the bytes, so they never change.

Corresponds with GET /branches/{branch}/claims/{id} (the `GetBranchClaim` operationId).

func (*Client) GetBranchClaimContent

func (c *Client) GetBranchClaimContent(ctx context.Context, branch BranchName, id ClaimId, reqEditors ...RequestEditorFn) (*http.Response, error)

GetBranchClaimContent Fetch the content of a claim within a branch's closure

Streams the content of claim `{id}` — **only if it lies in branch `{branch}`'s closure** (same closure guarantee as the claim itself; out-of-closure or unknown → `404`). Requires the **R** right on that branch. Content is addressed by the claim that holds it, not by a raw hash: the server resolves whether the bytes live inline in the claim or in a separate blob, so the client can't tell and doesn't need to — and the read stays scoped as the route is scoped. Immutably **cacheable** by the claim id.

Corresponds with GET /branches/{branch}/claims/{id}/content (the `GetBranchClaimContent` operationId).

func (*Client) GetBranchHead

func (c *Client) GetBranchHead(ctx context.Context, branch BranchName, reqEditors ...RequestEditorFn) (*http.Response, error)

GetBranchHead Current head id of a branch

Returns the branch's current head id — a moving target (it advances on every contribution). Requires the **R** right on that branch. Cacheable **with revalidation** (weak `ETag`, `Cache-Control: no-cache`): a conditional request is cheap when the head has not moved. To inspect the head claim itself, fetch it via `GET /branches/{branch}/claims/{id}`.

Corresponds with GET /branches/{branch}/head (the `GetBranchHead` operationId).

func (*Client) GetBranchInfo

func (c *Client) GetBranchInfo(ctx context.Context, branch BranchName, reqEditors ...RequestEditorFn) (*http.Response, error)

GetBranchInfo What is known about a branch

Reports a branch beyond its head id: the head's **height** — the generation number of the branch's newest claim, so the depth of what it points at — and **when it last moved**, which is the head claim's `created_at`.

Everything here comes from the head claim, so it costs one claim read. A claim count is deliberately absent: counting a branch's claims is a walk of its closure, which is a query (`POST /query`) and not a field.

Requires the **R** right on the branch. Cacheable **with revalidation** — every field moves when the branch does.

Corresponds with GET /branches/{branch}/info (the `GetBranchInfo` operationId).

func (*Client) GetClaim

func (c *Client) GetClaim(ctx context.Context, id ClaimId, reqEditors ...RequestEditorFn) (*http.Response, error)

GetClaim Fetch a claim by id from the Universe (privileged)

Returns claim `{id}` as its signed CBOR bytes from the Universe under **no closure at all** — no branch table, and no confinement to the current head. This is what makes it privileged, and what it exists for: reaching an archive from a Universe and a head id alone, as when restoring from a head kept outside the server. A claim the Universe holds is returned even where `GET /archive/claims/{id}` reports it not-found.

This collection reads the `$universe` scope: the same scope a RankeQL body names as `select.branch: "$universe"`, and the same target a grant is written against. It requires the **R** right on `$universe`, to which only **R** applies. An ordinary glob confers it by no accident — a `$`-prefixed target needs an exact grant, so `R *` reaches neither reserved scope.

Immutably cacheable by id.

Corresponds with GET /universe/claims/{id} (the `GetClaim` operationId).

func (*Client) GetClaimContent

func (c *Client) GetClaimContent(ctx context.Context, id ClaimId, reqEditors ...RequestEditorFn) (*http.Response, error)

GetClaimContent Fetch the content of a claim by id from the Universe (privileged)

Streams the content of claim `{id}` from the Universe under no closure — the privileged read, conferred only through **R** on `$universe`. Content is addressed by the claim; whether the bytes are inline or a separate blob is hidden. Immutably cacheable by the claim id.

Corresponds with GET /universe/claims/{id}/content (the `GetClaimContent` operationId).

func (*Client) GetVerification

func (c *Client) GetVerification(ctx context.Context, reportId string, reqEditors ...RequestEditorFn) (*http.Response, error)

GetVerification Show a verification run

The report for a run. Poll until `status` leaves `running`; while it is still running the response carries a `Retry-After` hint and the progress counters (`claimsChecked`, `bytesRead`) advance between polls.

Corresponds with GET /system/verifications/{reportId} (the `GetVerification` operationId).

func (*Client) Health

func (c *Client) Health(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

Health Liveness and signer identity

Reports that the stack is up and the signing/contributor identity it attests merges under. Whether this requires a privileged subject is a core-access decision, not part of this contract.

Corresponds with GET /health (the `Health` operationId).

func (*Client) ListBranches

func (c *Client) ListBranches(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

ListBranches List the branch table's branches

Returns every branch the branch table holds, each with its name and current head id. Reachable **without knowing any branch name**, so a client discovers what it may address before using the routes that take one; an archive with no branches yet answers with an empty list.

Requires the **R** right on the reserved `$branches` target, which is what core-access grants as "enumerates the table".

Cacheable **with revalidation** (weak `ETag`, `Cache-Control: no-cache`): every head in the list moves as its branch is contributed to. The listing is answered from **one archive snapshot**, so the heads are consistent with each other.

Corresponds with GET /branches (the `ListBranches` operationId).

func (*Client) ListStorageLayers

func (c *Client) ListStorageLayers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

ListStorageLayers List storage layers

Lists the stack's storage layers (read-through tiers) by **name and type only** — never connection details or secrets. Naming layers is what lets a verification run target one directly (a read-through view can mask the loss of an object on a deeper layer).

Corresponds with GET /system/layers (the `ListStorageLayers` operationId).

func (*Client) ListVerifications

func (c *Client) ListVerifications(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

ListVerifications List verification runs

Verification runs across the whole stack, newest first. Each report is a **point-in-time record**: a layer repaired externally shows clean in a later run, so reports accumulate rather than overwrite — until explicitly removed with `DELETE /system/verifications/{reportId}`.

The API lives under `/system/` because a verification run is a ranke-db extension beyond the paper's surface rather than archive content: it is a stack-wide operational resource, rooted at a closure named in the request body and not in the path. (Branch reads no longer occupy the root, so nothing here is avoiding a collision.)

Corresponds with GET /system/verifications (the `ListVerifications` operationId).

func (*Client) Query

func (c *Client) Query(ctx context.Context, body QueryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

Query Read the graph with a declarative query

Runs a RankeQL query (§RankeQL) and streams the result set, one item per result, in the serialization chosen by `output.encoding`. Results carry the natural `(created_at, id)` order unless `order` sorts them, with its keys applied in priority order and that natural order breaking any remaining ties; to page, carry the last result's order key into the next request's `where` (pin `select.head` so the closure cannot shift between pages).

When `execution.report` names a verbosity, the **final item** in the sequence is a `QueryReport` (see the schema) — typed distinctly from result items and always last — carrying the execution log, timing, and whether a limit truncated the read. `execution.layer` pins which storage layer runs it.

The response media type mirrors `output.encoding`: `application/json-seq` or `application/cbor-seq`. A branch named in `select` that does not exist is `404`; claims outside the scope's closure simply do not appear. `$universe` is the privileged unconfined read and requires `select.head`.

Takes a body of the `application/json` content type.

Corresponds with POST /query (the `Query` operationId).

func (*Client) QueryWithBody

func (c *Client) QueryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

QueryWithBody Read the graph with a declarative query

Runs a RankeQL query (§RankeQL) and streams the result set, one item per result, in the serialization chosen by `output.encoding`. Results carry the natural `(created_at, id)` order unless `order` sorts them, with its keys applied in priority order and that natural order breaking any remaining ties; to page, carry the last result's order key into the next request's `where` (pin `select.head` so the closure cannot shift between pages).

When `execution.report` names a verbosity, the **final item** in the sequence is a `QueryReport` (see the schema) — typed distinctly from result items and always last — carrying the execution log, timing, and whether a limit truncated the read. `execution.layer` pins which storage layer runs it.

The response media type mirrors `output.encoding`: `application/json-seq` or `application/cbor-seq`. A branch named in `select` that does not exist is `404`; claims outside the scope's closure simply do not appear. `$universe` is the privileged unconfined read and requires `select.head`.

Takes any type of body and a specified content type.

Corresponds with POST /query (the `Query` operationId).

func (*Client) StartVerification

func (c *Client) StartVerification(ctx context.Context, body StartVerificationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

StartVerification Start a verification run

Starts a run from a `VerificationConfig`: walk the closure rooted at `closure` (a branch name — resolved to its current head and **pinned** for the life of the run — or a head id directly), reading the named `layer` directly, re-checking each claim to the configured depth. It returns *findings*, not contents, so it never leaks across closures.

A run may take a **very long time** (hours to days over a large closure at full-content depth), so it is always **asynchronous**: the call returns `202` immediately with the running report and a `Location` header pointing at the report resource. Poll it with `GET /system/verifications/{reportId}`, pacing by the `Retry-After` hint; stop it with `DELETE`. Starting the same run twice yields two independent point-in-time reports (runs are not deduplicated).

Verification is resource-heavy, so the stack caps the number of runs that may execute **concurrently** (configured; default 1). When that cap is already reached the call returns `429` — the server never stops a run to make room. To proceed, either wait (per `Retry-After`) or `GET /system/verifications` to see what is running and free a slot deliberately: `cancel` a run to stop it while keeping its report, or `DELETE` it to remove it entirely.

Takes a body of the `application/json` content type.

Corresponds with POST /system/verifications (the `StartVerification` operationId).

func (*Client) StartVerificationWithBody

func (c *Client) StartVerificationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

StartVerificationWithBody Start a verification run

Starts a run from a `VerificationConfig`: walk the closure rooted at `closure` (a branch name — resolved to its current head and **pinned** for the life of the run — or a head id directly), reading the named `layer` directly, re-checking each claim to the configured depth. It returns *findings*, not contents, so it never leaks across closures.

A run may take a **very long time** (hours to days over a large closure at full-content depth), so it is always **asynchronous**: the call returns `202` immediately with the running report and a `Location` header pointing at the report resource. Poll it with `GET /system/verifications/{reportId}`, pacing by the `Retry-After` hint; stop it with `DELETE`. Starting the same run twice yields two independent point-in-time reports (runs are not deduplicated).

Verification is resource-heavy, so the stack caps the number of runs that may execute **concurrently** (configured; default 1). When that cap is already reached the call returns `429` — the server never stops a run to make room. To proceed, either wait (per `Retry-After`) or `GET /system/verifications` to see what is running and free a slot deliberately: `cancel` a run to stop it while keeping its report, or `DELETE` it to remove it entirely.

Takes any type of body and a specified content type.

Corresponds with POST /system/verifications (the `StartVerification` operationId).

func (*Client) Whoami

func (c *Client) Whoami(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

Whoami What this credential may do

Reports the caller back to itself: the account its credential resolved to, that account's grants, and any caveats attenuating them. It answers about **this server's** access policy, never about the graph, which is why it sits under `/system`.

Needs no grant — a caller learns only what it already proved by authenticating, and nothing about any other account. A bad credential is still `401`, so this doubles as the side-effect-free way to check one.

`grants` and `caveats` are reported separately rather than intersected: a request is allowed when the account's grants permit it **and** every caveat still does, so seeing both is what explains a refusal. A token narrowed by attenuation has no other way to show what survived.

Corresponds with GET /system/whoami (the `Whoami` operationId).

type ClientInterface

type ClientInterface interface {

	// GetArchiveClaim Fetch a claim within the archive head's closure
	//
	// Returns claim `{id}` as its signed CBOR bytes if it lies in the closure of the
	// **whole Ranke-Archive** — the current branch-table head — whichever branch holds
	// it. A client reaches a claim without naming the branch it is on; a claim outside
	// that closure returns `404`.
	//
	// This collection reads the `$archive` scope: the same scope a RankeQL body names
	// as `select.branch: "$archive"`, and the same target a grant is written against.
	// It requires the **R** right on `$archive`.
	//
	// Immutably cacheable by id.
	//
	// Corresponds with GET /archive/claims/{id} (the `GetArchiveClaim` operationId).
	GetArchiveClaim(ctx context.Context, id ClaimId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetArchiveClaimContent Fetch the content of a claim within the archive head's closure
	//
	// Streams the content of claim `{id}` if it lies in the archive head's closure,
	// across every branch (same closure guarantee as the claim itself; outside it or
	// unknown → `404`). Reads the `$archive` scope and requires **R** on `$archive`.
	// Content is addressed by the claim; whether the bytes are inline or a separate
	// blob is hidden. Immutably cacheable by the claim id.
	//
	// Corresponds with GET /archive/claims/{id}/content (the `GetArchiveClaimContent` operationId).
	GetArchiveClaimContent(ctx context.Context, id ClaimId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetArchiveInfo What is known about the archive
	//
	// Reports the Ranke-Archive as a whole: the **branch-table head** — the id every
	// archive-scoped read is rooted at — with its height and when it last moved, and how
	// many branches the table holds.
	//
	// This is the only route that reports the branch-table head, which is what a client
	// needs to name the `$archive` scope in a query or a grant.
	//
	// Reads the `$archive` scope and requires the **R** right on `$archive`. Cacheable
	// **with revalidation**: the head advances on every contribution.
	//
	// Corresponds with GET /archive/info (the `GetArchiveInfo` operationId).
	GetArchiveInfo(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListBranches List the branch table's branches
	//
	// Returns every branch the branch table holds, each with its name and current
	// head id. Reachable **without knowing any branch name**, so a client discovers
	// what it may address before using the routes that take one; an archive with no
	// branches yet answers with an empty list.
	//
	// Requires the **R** right on the reserved `$branches` target, which is what
	// core-access grants as "enumerates the table".
	//
	// Cacheable **with revalidation** (weak `ETag`, `Cache-Control: no-cache`): every
	// head in the list moves as its branch is contributed to. The listing is answered
	// from **one archive snapshot**, so the heads are consistent with each other.
	//
	// Corresponds with GET /branches (the `ListBranches` operationId).
	ListBranches(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetBranchClaim Fetch a claim within a branch's closure
	//
	// Returns claim `{id}` as its signed CBOR bytes, **only if it lies in branch
	// `{branch}`'s closure**. A claim that is superseded, contradicted, or otherwise
	// outside the closure returns `404`, indistinguishable from one that does not
	// exist. Requires the **R** right on that branch.
	//
	// `{branch}` names an **ordinary branch**. A reserved scope name supplied here
	// names a branch that does not exist and is answered as `404`; each scope has
	// exactly one route (`/archive/…`, `/universe/…`).
	//
	// Immutably **cacheable** by id (strong `ETag`, `Cache-Control: public,
	// immutable`): the id content-addresses the bytes, so they never change.
	//
	// Corresponds with GET /branches/{branch}/claims/{id} (the `GetBranchClaim` operationId).
	GetBranchClaim(ctx context.Context, branch BranchName, id ClaimId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetBranchClaimContent Fetch the content of a claim within a branch's closure
	//
	// Streams the content of claim `{id}` — **only if it lies in branch `{branch}`'s
	// closure** (same closure guarantee as the claim itself; out-of-closure or
	// unknown → `404`). Requires the **R** right on that branch. Content is addressed
	// by the claim that holds it, not by a raw hash: the server resolves whether the
	// bytes live inline in the claim or in a separate blob, so the client can't tell
	// and doesn't need to — and the read stays scoped as the route is scoped.
	// Immutably **cacheable** by the claim id.
	//
	// Corresponds with GET /branches/{branch}/claims/{id}/content (the `GetBranchClaimContent` operationId).
	GetBranchClaimContent(ctx context.Context, branch BranchName, id ClaimId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetBranchHead Current head id of a branch
	//
	// Returns the branch's current head id — a moving target (it advances on every
	// contribution). Requires the **R** right on that branch. Cacheable **with
	// revalidation** (weak `ETag`, `Cache-Control: no-cache`): a conditional request
	// is cheap when the head has not moved. To inspect the head claim itself, fetch it
	// via `GET /branches/{branch}/claims/{id}`.
	//
	// Corresponds with GET /branches/{branch}/head (the `GetBranchHead` operationId).
	GetBranchHead(ctx context.Context, branch BranchName, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetBranchInfo What is known about a branch
	//
	// Reports a branch beyond its head id: the head's **height** — the generation number
	// of the branch's newest claim, so the depth of what it points at — and **when it last
	// moved**, which is the head claim's `created_at`.
	//
	// Everything here comes from the head claim, so it costs one claim read. A claim count
	// is deliberately absent: counting a branch's claims is a walk of its closure, which is
	// a query (`POST /query`) and not a field.
	//
	// Requires the **R** right on the branch. Cacheable **with revalidation** — every
	// field moves when the branch does.
	//
	// Corresponds with GET /branches/{branch}/info (the `GetBranchInfo` operationId).
	GetBranchInfo(ctx context.Context, branch BranchName, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ContributeWithBody Contribute signed claims (atomic)
	//
	// Contributes one or more signed claims to a branch as a single **atomic**
	// merge — all are absorbed under one new branch-table head, or none are.
	// Content-addressed and therefore **idempotent**: re-contributing yields the same
	// ids with no duplicates.
	//
	// The body is ranke's contribution stream: a **CBOR sequence** (RFC 8742) of
	// records, self-framing so a contribution of any size streams.
	//
	//   - `[2, ["<branch>", …]]` — **first**, the branches this contribution touches
	//   - `[0, <id>, <claim bytes>, "<branch>"]` — a claim, as the canonical CBOR its
	//     contributor signed, and the branch it joins
	//   - `[1, <hash>, <content bytes>]` — externalized content, which lives in the
	//     Universe unbranched and so names no branch
	//
	// The header comes first so the **C** right is settled on every declared branch
	// before any of the body is read; a claim naming an undeclared branch is refused, so
	// the declaration binds. One contribution may therefore advance **several branches**,
	// and an unauthorized one is answered without its payload being read.
	//
	// Payloads are CBOR byte strings carried through untouched: a claim's id is a
	// signature over exactly those bytes, so the server stores what it was sent. The id
	// is explicit because it cannot be derived — `Sign(H(S(node)))` is made with the
	// contributor's key, and the canonical encoding carries only the node. Content is
	// checked against the hash addressing it.
	//
	// Send every claim the closure needs that the archive may not hold yet — a
	// first-time contributor includes its own `contribution/contributor` claim, since
	// everything it signs references it.
	//
	// The sequencer mints the `contribution/branches` branch-table claim recording the
	// merge (paper 02 §Sequencer). On success the new branch-table head id and the
	// contributed claim ids are returned.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /contribute (the `Contribute` operationId).
	ContributeWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AdvanceDevClockWithBody Advance the dev sequencer's clock
	//
	// Available **only** when the stack was launched with `--dev` against a `dev`
	// Sequencer: moves the clock the Sequencer mints `created_at` and branch-table
	// timestamps from forward to (at least) the given instant, so a client that
	// knows its own story's schedule — a fixture generator, say — can make the
	// archive's *recorded* history track its *narrated* one, one contribution at a
	// time, rather than every merge landing at the real wall-clock moment the
	// client happened to run.
	//
	// The clock never moves backward: a request older than its current position
	// is accepted and answered with the position unchanged. Absent `--dev`, or
	// against a `concurrent` (production) Sequencer, the route is `501` — the
	// witnessed merge time stays real, which is the whole point of `R-C2DATE`.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /dev/clock (the `AdvanceDevClock` operationId).
	AdvanceDevClockWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// AdvanceDevClock Advance the dev sequencer's clock
	//
	// Available **only** when the stack was launched with `--dev` against a `dev`
	// Sequencer: moves the clock the Sequencer mints `created_at` and branch-table
	// timestamps from forward to (at least) the given instant, so a client that
	// knows its own story's schedule — a fixture generator, say — can make the
	// archive's *recorded* history track its *narrated* one, one contribution at a
	// time, rather than every merge landing at the real wall-clock moment the
	// client happened to run.
	//
	// The clock never moves backward: a request older than its current position
	// is accepted and answered with the position unchanged. Absent `--dev`, or
	// against a `concurrent` (production) Sequencer, the route is `501` — the
	// witnessed merge time stays real, which is the whole point of `R-C2DATE`.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /dev/clock (the `AdvanceDevClock` operationId).
	AdvanceDevClock(ctx context.Context, body AdvanceDevClockJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Health Liveness and signer identity
	//
	// Reports that the stack is up and the signing/contributor identity it
	// attests merges under. Whether this requires a privileged subject is a
	// core-access decision, not part of this contract.
	//
	// Corresponds with GET /health (the `Health` operationId).
	Health(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// QueryWithBody Read the graph with a declarative query
	//
	// Runs a RankeQL query (§RankeQL) and streams the result set, one item per
	// result, in the serialization chosen by `output.encoding`. Results carry the
	// natural `(created_at, id)` order unless `order` sorts them, with its keys
	// applied in priority order and that natural order breaking any remaining ties;
	// to page, carry the last result's order key into the next request's `where`
	// (pin `select.head` so the closure cannot shift between pages).
	//
	// When `execution.report` names a verbosity, the **final item** in the sequence
	// is a `QueryReport` (see the schema) — typed distinctly from result items and
	// always last — carrying the execution log, timing, and whether a limit truncated
	// the read. `execution.layer` pins which storage layer runs it.
	//
	// The response media type mirrors `output.encoding`: `application/json-seq` or
	// `application/cbor-seq`. A branch named in `select` that does not exist is
	// `404`; claims outside the scope's closure simply do not appear. `$universe`
	// is the privileged unconfined read and requires `select.head`.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /query (the `Query` operationId).
	QueryWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Query Read the graph with a declarative query
	//
	// Runs a RankeQL query (§RankeQL) and streams the result set, one item per
	// result, in the serialization chosen by `output.encoding`. Results carry the
	// natural `(created_at, id)` order unless `order` sorts them, with its keys
	// applied in priority order and that natural order breaking any remaining ties;
	// to page, carry the last result's order key into the next request's `where`
	// (pin `select.head` so the closure cannot shift between pages).
	//
	// When `execution.report` names a verbosity, the **final item** in the sequence
	// is a `QueryReport` (see the schema) — typed distinctly from result items and
	// always last — carrying the execution log, timing, and whether a limit truncated
	// the read. `execution.layer` pins which storage layer runs it.
	//
	// The response media type mirrors `output.encoding`: `application/json-seq` or
	// `application/cbor-seq`. A branch named in `select` that does not exist is
	// `404`; claims outside the scope's closure simply do not appear. `$universe`
	// is the privileged unconfined read and requires `select.head`.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /query (the `Query` operationId).
	Query(ctx context.Context, body QueryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListStorageLayers List storage layers
	//
	// Lists the stack's storage layers (read-through tiers) by **name and type
	// only** — never connection details or secrets. Naming layers is what lets a
	// verification run target one directly (a read-through view can mask the loss
	// of an object on a deeper layer).
	//
	// Corresponds with GET /system/layers (the `ListStorageLayers` operationId).
	ListStorageLayers(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// ListVerifications List verification runs
	//
	// Verification runs across the whole stack, newest first. Each report is a
	// **point-in-time record**: a layer repaired externally shows clean in a later
	// run, so reports accumulate rather than overwrite — until explicitly removed
	// with `DELETE /system/verifications/{reportId}`.
	//
	// The API lives under `/system/` because a verification run is a ranke-db
	// extension beyond the paper's surface rather than archive content: it is a
	// stack-wide operational resource, rooted at a closure named in the request body
	// and not in the path. (Branch reads no longer occupy the root, so nothing here
	// is avoiding a collision.)
	//
	// Corresponds with GET /system/verifications (the `ListVerifications` operationId).
	ListVerifications(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// StartVerificationWithBody Start a verification run
	//
	// Starts a run from a `VerificationConfig`: walk the closure rooted at
	// `closure` (a branch name — resolved to its current head and **pinned** for
	// the life of the run — or a head id directly), reading the named `layer`
	// directly, re-checking each claim to the configured depth. It returns
	// *findings*, not contents, so it never leaks across closures.
	//
	// A run may take a **very long time** (hours to days over a large closure at
	// full-content depth), so it is always **asynchronous**: the call returns `202`
	// immediately with the running report and a `Location` header pointing at the
	// report resource. Poll it with `GET /system/verifications/{reportId}`, pacing
	// by the `Retry-After` hint; stop it with `DELETE`. Starting the same run twice
	// yields two independent point-in-time reports (runs are not deduplicated).
	//
	// Verification is resource-heavy, so the stack caps the number of runs that may
	// execute **concurrently** (configured; default 1). When that cap is already
	// reached the call returns `429` — the server never stops a run to make room. To
	// proceed, either wait (per `Retry-After`) or `GET /system/verifications` to see
	// what is running and free a slot deliberately: `cancel` a run to stop it while
	// keeping its report, or `DELETE` it to remove it entirely.
	//
	// Takes any type of body and a specified content type.
	//
	// Corresponds with POST /system/verifications (the `StartVerification` operationId).
	StartVerificationWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)

	// StartVerification Start a verification run
	//
	// Starts a run from a `VerificationConfig`: walk the closure rooted at
	// `closure` (a branch name — resolved to its current head and **pinned** for
	// the life of the run — or a head id directly), reading the named `layer`
	// directly, re-checking each claim to the configured depth. It returns
	// *findings*, not contents, so it never leaks across closures.
	//
	// A run may take a **very long time** (hours to days over a large closure at
	// full-content depth), so it is always **asynchronous**: the call returns `202`
	// immediately with the running report and a `Location` header pointing at the
	// report resource. Poll it with `GET /system/verifications/{reportId}`, pacing
	// by the `Retry-After` hint; stop it with `DELETE`. Starting the same run twice
	// yields two independent point-in-time reports (runs are not deduplicated).
	//
	// Verification is resource-heavy, so the stack caps the number of runs that may
	// execute **concurrently** (configured; default 1). When that cap is already
	// reached the call returns `429` — the server never stops a run to make room. To
	// proceed, either wait (per `Retry-After`) or `GET /system/verifications` to see
	// what is running and free a slot deliberately: `cancel` a run to stop it while
	// keeping its report, or `DELETE` it to remove it entirely.
	//
	// Takes a body of the `application/json` content type.
	//
	// Corresponds with POST /system/verifications (the `StartVerification` operationId).
	StartVerification(ctx context.Context, body StartVerificationJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)

	// DeleteVerification Delete a verification run
	//
	// Really deletes the run and its report. If the run is still `running` it is
	// stopped first, then the record is removed — so this both aborts a run and
	// cleans up finished history in one step. Unlike the cancel action, nothing
	// survives: a subsequent `GET` is `404`. Either verb frees a concurrency slot;
	// cancel keeps the report, delete removes it.
	//
	// Corresponds with DELETE /system/verifications/{reportId} (the `DeleteVerification` operationId).
	DeleteVerification(ctx context.Context, reportId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetVerification Show a verification run
	//
	// The report for a run. Poll until `status` leaves `running`; while it is still
	// running the response carries a `Retry-After` hint and the progress counters
	// (`claimsChecked`, `bytesRead`) advance between polls.
	//
	// Corresponds with GET /system/verifications/{reportId} (the `GetVerification` operationId).
	GetVerification(ctx context.Context, reportId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// CancelVerification Cancel a running verification run
	//
	// Stops a `running` run but **keeps** its report: the record stays in history
	// with `status` `stopped` and whatever partial findings it had gathered, and the
	// concurrency slot is freed. Use this to abort a run you want to keep a record
	// of; use `DELETE` to remove it entirely. Idempotent — cancelling a run that has
	// already finished or stopped returns its current report unchanged.
	//
	// Corresponds with POST /system/verifications/{reportId}/cancel (the `CancelVerification` operationId).
	CancelVerification(ctx context.Context, reportId string, reqEditors ...RequestEditorFn) (*http.Response, error)

	// Whoami What this credential may do
	//
	// Reports the caller back to itself: the account its credential resolved to,
	// that account's grants, and any caveats attenuating them. It answers about
	// **this server's** access policy, never about the graph, which is why it sits
	// under `/system`.
	//
	// Needs no grant — a caller learns only what it already proved by
	// authenticating, and nothing about any other account. A bad credential is
	// still `401`, so this doubles as the side-effect-free way to check one.
	//
	// `grants` and `caveats` are reported separately rather than intersected: a
	// request is allowed when the account's grants permit it **and** every caveat
	// still does, so seeing both is what explains a refusal. A token narrowed by
	// attenuation has no other way to show what survived.
	//
	// Corresponds with GET /system/whoami (the `Whoami` operationId).
	Whoami(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetClaim Fetch a claim by id from the Universe (privileged)
	//
	// Returns claim `{id}` as its signed CBOR bytes from the Universe under **no
	// closure at all** — no branch table, and no confinement to the current head.
	// This is what makes it privileged, and what it exists for: reaching an archive
	// from a Universe and a head id alone, as when restoring from a head kept outside
	// the server. A claim the Universe holds is returned even where
	// `GET /archive/claims/{id}` reports it not-found.
	//
	// This collection reads the `$universe` scope: the same scope a RankeQL body names
	// as `select.branch: "$universe"`, and the same target a grant is written against.
	// It requires the **R** right on `$universe`, to which only **R** applies. An
	// ordinary glob confers it by no accident — a `$`-prefixed target needs an exact
	// grant, so `R *` reaches neither reserved scope.
	//
	// Immutably cacheable by id.
	//
	// Corresponds with GET /universe/claims/{id} (the `GetClaim` operationId).
	GetClaim(ctx context.Context, id ClaimId, reqEditors ...RequestEditorFn) (*http.Response, error)

	// GetClaimContent Fetch the content of a claim by id from the Universe (privileged)
	//
	// Streams the content of claim `{id}` from the Universe under no closure — the
	// privileged read, conferred only through **R** on `$universe`. Content is
	// addressed by the claim; whether the bytes are inline or a separate blob is
	// hidden. Immutably cacheable by the claim id.
	//
	// Corresponds with GET /universe/claims/{id}/content (the `GetClaimContent` operationId).
	GetClaimContent(ctx context.Context, id ClaimId, reqEditors ...RequestEditorFn) (*http.Response, error)
}

The interface specification for the client above.

type ClientOption

type ClientOption func(*Client) error

ClientOption allows setting custom parameters during construction

func WithBaseURL

func WithBaseURL(baseURL string) ClientOption

WithBaseURL overrides the baseURL.

func WithHTTPClient

func WithHTTPClient(doer HttpRequestDoer) ClientOption

WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.

func WithRequestEditorFn

func WithRequestEditorFn(fn RequestEditorFn) ClientOption

WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the request.

type ClientWithResponses

type ClientWithResponses struct {
	ClientInterface
}

ClientWithResponses builds on ClientInterface to offer response payloads

func NewClientWithResponses

func NewClientWithResponses(server string, opts ...ClientOption) (*ClientWithResponses, error)

NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling

func (*ClientWithResponses) AdvanceDevClockWithBodyWithResponse

func (c *ClientWithResponses) AdvanceDevClockWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdvanceDevClockResponse, error)

AdvanceDevClockWithBodyWithResponse Advance the dev sequencer's clock

Available **only** when the stack was launched with `--dev` against a `dev` Sequencer: moves the clock the Sequencer mints `created_at` and branch-table timestamps from forward to (at least) the given instant, so a client that knows its own story's schedule — a fixture generator, say — can make the archive's *recorded* history track its *narrated* one, one contribution at a time, rather than every merge landing at the real wall-clock moment the client happened to run.

The clock never moves backward: a request older than its current position is accepted and answered with the position unchanged. Absent `--dev`, or against a `concurrent` (production) Sequencer, the route is `501` — the witnessed merge time stays real, which is the whole point of `R-C2DATE`.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /dev/clock (the `AdvanceDevClock` operationId).

func (*ClientWithResponses) AdvanceDevClockWithResponse

func (c *ClientWithResponses) AdvanceDevClockWithResponse(ctx context.Context, body AdvanceDevClockJSONRequestBody, reqEditors ...RequestEditorFn) (*AdvanceDevClockResponse, error)

AdvanceDevClockWithResponse Advance the dev sequencer's clock

Available **only** when the stack was launched with `--dev` against a `dev` Sequencer: moves the clock the Sequencer mints `created_at` and branch-table timestamps from forward to (at least) the given instant, so a client that knows its own story's schedule — a fixture generator, say — can make the archive's *recorded* history track its *narrated* one, one contribution at a time, rather than every merge landing at the real wall-clock moment the client happened to run.

The clock never moves backward: a request older than its current position is accepted and answered with the position unchanged. Absent `--dev`, or against a `concurrent` (production) Sequencer, the route is `501` — the witnessed merge time stays real, which is the whole point of `R-C2DATE`.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /dev/clock (the `AdvanceDevClock` operationId).

func (*ClientWithResponses) CancelVerificationWithResponse

func (c *ClientWithResponses) CancelVerificationWithResponse(ctx context.Context, reportId string, reqEditors ...RequestEditorFn) (*CancelVerificationResponse, error)

CancelVerificationWithResponse Cancel a running verification run

Stops a `running` run but **keeps** its report: the record stays in history with `status` `stopped` and whatever partial findings it had gathered, and the concurrency slot is freed. Use this to abort a run you want to keep a record of; use `DELETE` to remove it entirely. Idempotent — cancelling a run that has already finished or stopped returns its current report unchanged.

Returns a wrapper object for the known response body format(s).

Corresponds with POST /system/verifications/{reportId}/cancel (the `CancelVerification` operationId).

func (*ClientWithResponses) ContributeWithBodyWithResponse

func (c *ClientWithResponses) ContributeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ContributeResponse, error)

ContributeWithBodyWithResponse Contribute signed claims (atomic)

Contributes one or more signed claims to a branch as a single **atomic** merge — all are absorbed under one new branch-table head, or none are. Content-addressed and therefore **idempotent**: re-contributing yields the same ids with no duplicates.

The body is ranke's contribution stream: a **CBOR sequence** (RFC 8742) of records, self-framing so a contribution of any size streams.

  • `[2, ["<branch>", …]]` — **first**, the branches this contribution touches
  • `[0, <id>, <claim bytes>, "<branch>"]` — a claim, as the canonical CBOR its contributor signed, and the branch it joins
  • `[1, <hash>, <content bytes>]` — externalized content, which lives in the Universe unbranched and so names no branch

The header comes first so the **C** right is settled on every declared branch before any of the body is read; a claim naming an undeclared branch is refused, so the declaration binds. One contribution may therefore advance **several branches**, and an unauthorized one is answered without its payload being read.

Payloads are CBOR byte strings carried through untouched: a claim's id is a signature over exactly those bytes, so the server stores what it was sent. The id is explicit because it cannot be derived — `Sign(H(S(node)))` is made with the contributor's key, and the canonical encoding carries only the node. Content is checked against the hash addressing it.

Send every claim the closure needs that the archive may not hold yet — a first-time contributor includes its own `contribution/contributor` claim, since everything it signs references it.

The sequencer mints the `contribution/branches` branch-table claim recording the merge (paper 02 §Sequencer). On success the new branch-table head id and the contributed claim ids are returned.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /contribute (the `Contribute` operationId).

func (*ClientWithResponses) DeleteVerificationWithResponse

func (c *ClientWithResponses) DeleteVerificationWithResponse(ctx context.Context, reportId string, reqEditors ...RequestEditorFn) (*DeleteVerificationResponse, error)

DeleteVerificationWithResponse Delete a verification run

Really deletes the run and its report. If the run is still `running` it is stopped first, then the record is removed — so this both aborts a run and cleans up finished history in one step. Unlike the cancel action, nothing survives: a subsequent `GET` is `404`. Either verb frees a concurrency slot; cancel keeps the report, delete removes it.

Returns a wrapper object for the known response body format(s).

Corresponds with DELETE /system/verifications/{reportId} (the `DeleteVerification` operationId).

func (*ClientWithResponses) GetArchiveClaimContentWithResponse

func (c *ClientWithResponses) GetArchiveClaimContentWithResponse(ctx context.Context, id ClaimId, reqEditors ...RequestEditorFn) (*GetArchiveClaimContentResponse, error)

GetArchiveClaimContentWithResponse Fetch the content of a claim within the archive head's closure

Streams the content of claim `{id}` if it lies in the archive head's closure, across every branch (same closure guarantee as the claim itself; outside it or unknown → `404`). Reads the `$archive` scope and requires **R** on `$archive`. Content is addressed by the claim; whether the bytes are inline or a separate blob is hidden. Immutably cacheable by the claim id.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /archive/claims/{id}/content (the `GetArchiveClaimContent` operationId).

func (*ClientWithResponses) GetArchiveClaimWithResponse

func (c *ClientWithResponses) GetArchiveClaimWithResponse(ctx context.Context, id ClaimId, reqEditors ...RequestEditorFn) (*GetArchiveClaimResponse, error)

GetArchiveClaimWithResponse Fetch a claim within the archive head's closure

Returns claim `{id}` as its signed CBOR bytes if it lies in the closure of the **whole Ranke-Archive** — the current branch-table head — whichever branch holds it. A client reaches a claim without naming the branch it is on; a claim outside that closure returns `404`.

This collection reads the `$archive` scope: the same scope a RankeQL body names as `select.branch: "$archive"`, and the same target a grant is written against. It requires the **R** right on `$archive`.

Immutably cacheable by id.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /archive/claims/{id} (the `GetArchiveClaim` operationId).

func (*ClientWithResponses) GetArchiveInfoWithResponse

func (c *ClientWithResponses) GetArchiveInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetArchiveInfoResponse, error)

GetArchiveInfoWithResponse What is known about the archive

Reports the Ranke-Archive as a whole: the **branch-table head** — the id every archive-scoped read is rooted at — with its height and when it last moved, and how many branches the table holds.

This is the only route that reports the branch-table head, which is what a client needs to name the `$archive` scope in a query or a grant.

Reads the `$archive` scope and requires the **R** right on `$archive`. Cacheable **with revalidation**: the head advances on every contribution.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /archive/info (the `GetArchiveInfo` operationId).

func (*ClientWithResponses) GetBranchClaimContentWithResponse

func (c *ClientWithResponses) GetBranchClaimContentWithResponse(ctx context.Context, branch BranchName, id ClaimId, reqEditors ...RequestEditorFn) (*GetBranchClaimContentResponse, error)

GetBranchClaimContentWithResponse Fetch the content of a claim within a branch's closure

Streams the content of claim `{id}` — **only if it lies in branch `{branch}`'s closure** (same closure guarantee as the claim itself; out-of-closure or unknown → `404`). Requires the **R** right on that branch. Content is addressed by the claim that holds it, not by a raw hash: the server resolves whether the bytes live inline in the claim or in a separate blob, so the client can't tell and doesn't need to — and the read stays scoped as the route is scoped. Immutably **cacheable** by the claim id.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /branches/{branch}/claims/{id}/content (the `GetBranchClaimContent` operationId).

func (*ClientWithResponses) GetBranchClaimWithResponse

func (c *ClientWithResponses) GetBranchClaimWithResponse(ctx context.Context, branch BranchName, id ClaimId, reqEditors ...RequestEditorFn) (*GetBranchClaimResponse, error)

GetBranchClaimWithResponse Fetch a claim within a branch's closure

Returns claim `{id}` as its signed CBOR bytes, **only if it lies in branch `{branch}`'s closure**. A claim that is superseded, contradicted, or otherwise outside the closure returns `404`, indistinguishable from one that does not exist. Requires the **R** right on that branch.

`{branch}` names an **ordinary branch**. A reserved scope name supplied here names a branch that does not exist and is answered as `404`; each scope has exactly one route (`/archive/…`, `/universe/…`).

Immutably **cacheable** by id (strong `ETag`, `Cache-Control: public, immutable`): the id content-addresses the bytes, so they never change.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /branches/{branch}/claims/{id} (the `GetBranchClaim` operationId).

func (*ClientWithResponses) GetBranchHeadWithResponse

func (c *ClientWithResponses) GetBranchHeadWithResponse(ctx context.Context, branch BranchName, reqEditors ...RequestEditorFn) (*GetBranchHeadResponse, error)

GetBranchHeadWithResponse Current head id of a branch

Returns the branch's current head id — a moving target (it advances on every contribution). Requires the **R** right on that branch. Cacheable **with revalidation** (weak `ETag`, `Cache-Control: no-cache`): a conditional request is cheap when the head has not moved. To inspect the head claim itself, fetch it via `GET /branches/{branch}/claims/{id}`.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /branches/{branch}/head (the `GetBranchHead` operationId).

func (*ClientWithResponses) GetBranchInfoWithResponse

func (c *ClientWithResponses) GetBranchInfoWithResponse(ctx context.Context, branch BranchName, reqEditors ...RequestEditorFn) (*GetBranchInfoResponse, error)

GetBranchInfoWithResponse What is known about a branch

Reports a branch beyond its head id: the head's **height** — the generation number of the branch's newest claim, so the depth of what it points at — and **when it last moved**, which is the head claim's `created_at`.

Everything here comes from the head claim, so it costs one claim read. A claim count is deliberately absent: counting a branch's claims is a walk of its closure, which is a query (`POST /query`) and not a field.

Requires the **R** right on the branch. Cacheable **with revalidation** — every field moves when the branch does.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /branches/{branch}/info (the `GetBranchInfo` operationId).

func (*ClientWithResponses) GetClaimContentWithResponse

func (c *ClientWithResponses) GetClaimContentWithResponse(ctx context.Context, id ClaimId, reqEditors ...RequestEditorFn) (*GetClaimContentResponse, error)

GetClaimContentWithResponse Fetch the content of a claim by id from the Universe (privileged)

Streams the content of claim `{id}` from the Universe under no closure — the privileged read, conferred only through **R** on `$universe`. Content is addressed by the claim; whether the bytes are inline or a separate blob is hidden. Immutably cacheable by the claim id.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /universe/claims/{id}/content (the `GetClaimContent` operationId).

func (*ClientWithResponses) GetClaimWithResponse

func (c *ClientWithResponses) GetClaimWithResponse(ctx context.Context, id ClaimId, reqEditors ...RequestEditorFn) (*GetClaimResponse, error)

GetClaimWithResponse Fetch a claim by id from the Universe (privileged)

Returns claim `{id}` as its signed CBOR bytes from the Universe under **no closure at all** — no branch table, and no confinement to the current head. This is what makes it privileged, and what it exists for: reaching an archive from a Universe and a head id alone, as when restoring from a head kept outside the server. A claim the Universe holds is returned even where `GET /archive/claims/{id}` reports it not-found.

This collection reads the `$universe` scope: the same scope a RankeQL body names as `select.branch: "$universe"`, and the same target a grant is written against. It requires the **R** right on `$universe`, to which only **R** applies. An ordinary glob confers it by no accident — a `$`-prefixed target needs an exact grant, so `R *` reaches neither reserved scope.

Immutably cacheable by id.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /universe/claims/{id} (the `GetClaim` operationId).

func (*ClientWithResponses) GetVerificationWithResponse

func (c *ClientWithResponses) GetVerificationWithResponse(ctx context.Context, reportId string, reqEditors ...RequestEditorFn) (*GetVerificationResponse, error)

GetVerificationWithResponse Show a verification run

The report for a run. Poll until `status` leaves `running`; while it is still running the response carries a `Retry-After` hint and the progress counters (`claimsChecked`, `bytesRead`) advance between polls.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /system/verifications/{reportId} (the `GetVerification` operationId).

func (*ClientWithResponses) HealthWithResponse

func (c *ClientWithResponses) HealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthResponse, error)

HealthWithResponse Liveness and signer identity

Reports that the stack is up and the signing/contributor identity it attests merges under. Whether this requires a privileged subject is a core-access decision, not part of this contract.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /health (the `Health` operationId).

func (*ClientWithResponses) ListBranchesWithResponse

func (c *ClientWithResponses) ListBranchesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListBranchesResponse, error)

ListBranchesWithResponse List the branch table's branches

Returns every branch the branch table holds, each with its name and current head id. Reachable **without knowing any branch name**, so a client discovers what it may address before using the routes that take one; an archive with no branches yet answers with an empty list.

Requires the **R** right on the reserved `$branches` target, which is what core-access grants as "enumerates the table".

Cacheable **with revalidation** (weak `ETag`, `Cache-Control: no-cache`): every head in the list moves as its branch is contributed to. The listing is answered from **one archive snapshot**, so the heads are consistent with each other.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /branches (the `ListBranches` operationId).

func (*ClientWithResponses) ListStorageLayersWithResponse

func (c *ClientWithResponses) ListStorageLayersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListStorageLayersResponse, error)

ListStorageLayersWithResponse List storage layers

Lists the stack's storage layers (read-through tiers) by **name and type only** — never connection details or secrets. Naming layers is what lets a verification run target one directly (a read-through view can mask the loss of an object on a deeper layer).

Returns a wrapper object for the known response body format(s).

Corresponds with GET /system/layers (the `ListStorageLayers` operationId).

func (*ClientWithResponses) ListVerificationsWithResponse

func (c *ClientWithResponses) ListVerificationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListVerificationsResponse, error)

ListVerificationsWithResponse List verification runs

Verification runs across the whole stack, newest first. Each report is a **point-in-time record**: a layer repaired externally shows clean in a later run, so reports accumulate rather than overwrite — until explicitly removed with `DELETE /system/verifications/{reportId}`.

The API lives under `/system/` because a verification run is a ranke-db extension beyond the paper's surface rather than archive content: it is a stack-wide operational resource, rooted at a closure named in the request body and not in the path. (Branch reads no longer occupy the root, so nothing here is avoiding a collision.)

Returns a wrapper object for the known response body format(s).

Corresponds with GET /system/verifications (the `ListVerifications` operationId).

func (*ClientWithResponses) QueryWithBodyWithResponse

func (c *ClientWithResponses) QueryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QueryResponse, error)

QueryWithBodyWithResponse Read the graph with a declarative query

Runs a RankeQL query (§RankeQL) and streams the result set, one item per result, in the serialization chosen by `output.encoding`. Results carry the natural `(created_at, id)` order unless `order` sorts them, with its keys applied in priority order and that natural order breaking any remaining ties; to page, carry the last result's order key into the next request's `where` (pin `select.head` so the closure cannot shift between pages).

When `execution.report` names a verbosity, the **final item** in the sequence is a `QueryReport` (see the schema) — typed distinctly from result items and always last — carrying the execution log, timing, and whether a limit truncated the read. `execution.layer` pins which storage layer runs it.

The response media type mirrors `output.encoding`: `application/json-seq` or `application/cbor-seq`. A branch named in `select` that does not exist is `404`; claims outside the scope's closure simply do not appear. `$universe` is the privileged unconfined read and requires `select.head`.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /query (the `Query` operationId).

func (*ClientWithResponses) QueryWithResponse

func (c *ClientWithResponses) QueryWithResponse(ctx context.Context, body QueryJSONRequestBody, reqEditors ...RequestEditorFn) (*QueryResponse, error)

QueryWithResponse Read the graph with a declarative query

Runs a RankeQL query (§RankeQL) and streams the result set, one item per result, in the serialization chosen by `output.encoding`. Results carry the natural `(created_at, id)` order unless `order` sorts them, with its keys applied in priority order and that natural order breaking any remaining ties; to page, carry the last result's order key into the next request's `where` (pin `select.head` so the closure cannot shift between pages).

When `execution.report` names a verbosity, the **final item** in the sequence is a `QueryReport` (see the schema) — typed distinctly from result items and always last — carrying the execution log, timing, and whether a limit truncated the read. `execution.layer` pins which storage layer runs it.

The response media type mirrors `output.encoding`: `application/json-seq` or `application/cbor-seq`. A branch named in `select` that does not exist is `404`; claims outside the scope's closure simply do not appear. `$universe` is the privileged unconfined read and requires `select.head`.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /query (the `Query` operationId).

func (*ClientWithResponses) StartVerificationWithBodyWithResponse

func (c *ClientWithResponses) StartVerificationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StartVerificationResponse, error)

StartVerificationWithBodyWithResponse Start a verification run

Starts a run from a `VerificationConfig`: walk the closure rooted at `closure` (a branch name — resolved to its current head and **pinned** for the life of the run — or a head id directly), reading the named `layer` directly, re-checking each claim to the configured depth. It returns *findings*, not contents, so it never leaks across closures.

A run may take a **very long time** (hours to days over a large closure at full-content depth), so it is always **asynchronous**: the call returns `202` immediately with the running report and a `Location` header pointing at the report resource. Poll it with `GET /system/verifications/{reportId}`, pacing by the `Retry-After` hint; stop it with `DELETE`. Starting the same run twice yields two independent point-in-time reports (runs are not deduplicated).

Verification is resource-heavy, so the stack caps the number of runs that may execute **concurrently** (configured; default 1). When that cap is already reached the call returns `429` — the server never stops a run to make room. To proceed, either wait (per `Retry-After`) or `GET /system/verifications` to see what is running and free a slot deliberately: `cancel` a run to stop it while keeping its report, or `DELETE` it to remove it entirely.

Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /system/verifications (the `StartVerification` operationId).

func (*ClientWithResponses) StartVerificationWithResponse

func (c *ClientWithResponses) StartVerificationWithResponse(ctx context.Context, body StartVerificationJSONRequestBody, reqEditors ...RequestEditorFn) (*StartVerificationResponse, error)

StartVerificationWithResponse Start a verification run

Starts a run from a `VerificationConfig`: walk the closure rooted at `closure` (a branch name — resolved to its current head and **pinned** for the life of the run — or a head id directly), reading the named `layer` directly, re-checking each claim to the configured depth. It returns *findings*, not contents, so it never leaks across closures.

A run may take a **very long time** (hours to days over a large closure at full-content depth), so it is always **asynchronous**: the call returns `202` immediately with the running report and a `Location` header pointing at the report resource. Poll it with `GET /system/verifications/{reportId}`, pacing by the `Retry-After` hint; stop it with `DELETE`. Starting the same run twice yields two independent point-in-time reports (runs are not deduplicated).

Verification is resource-heavy, so the stack caps the number of runs that may execute **concurrently** (configured; default 1). When that cap is already reached the call returns `429` — the server never stops a run to make room. To proceed, either wait (per `Retry-After`) or `GET /system/verifications` to see what is running and free a slot deliberately: `cancel` a run to stop it while keeping its report, or `DELETE` it to remove it entirely.

Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).

Corresponds with POST /system/verifications (the `StartVerification` operationId).

func (*ClientWithResponses) WhoamiWithResponse

func (c *ClientWithResponses) WhoamiWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*WhoamiResponse, error)

WhoamiWithResponse What this credential may do

Reports the caller back to itself: the account its credential resolved to, that account's grants, and any caveats attenuating them. It answers about **this server's** access policy, never about the graph, which is why it sits under `/system`.

Needs no grant — a caller learns only what it already proved by authenticating, and nothing about any other account. A bad credential is still `401`, so this doubles as the side-effect-free way to check one.

`grants` and `caveats` are reported separately rather than intersected: a request is allowed when the account's grants permit it **and** every caveat still does, so seeing both is what explains a refusal. A token narrowed by attenuation has no other way to show what survived.

Returns a wrapper object for the known response body format(s).

Corresponds with GET /system/whoami (the `Whoami` operationId).

type ClientWithResponsesInterface

type ClientWithResponsesInterface interface {

	// GetArchiveClaimWithResponse Fetch a claim within the archive head's closure
	//
	// Returns claim `{id}` as its signed CBOR bytes if it lies in the closure of the
	// **whole Ranke-Archive** — the current branch-table head — whichever branch holds
	// it. A client reaches a claim without naming the branch it is on; a claim outside
	// that closure returns `404`.
	//
	// This collection reads the `$archive` scope: the same scope a RankeQL body names
	// as `select.branch: "$archive"`, and the same target a grant is written against.
	// It requires the **R** right on `$archive`.
	//
	// Immutably cacheable by id.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /archive/claims/{id} (the `GetArchiveClaim` operationId).
	GetArchiveClaimWithResponse(ctx context.Context, id ClaimId, reqEditors ...RequestEditorFn) (*GetArchiveClaimResponse, error)

	// GetArchiveClaimContentWithResponse Fetch the content of a claim within the archive head's closure
	//
	// Streams the content of claim `{id}` if it lies in the archive head's closure,
	// across every branch (same closure guarantee as the claim itself; outside it or
	// unknown → `404`). Reads the `$archive` scope and requires **R** on `$archive`.
	// Content is addressed by the claim; whether the bytes are inline or a separate
	// blob is hidden. Immutably cacheable by the claim id.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /archive/claims/{id}/content (the `GetArchiveClaimContent` operationId).
	GetArchiveClaimContentWithResponse(ctx context.Context, id ClaimId, reqEditors ...RequestEditorFn) (*GetArchiveClaimContentResponse, error)

	// GetArchiveInfoWithResponse What is known about the archive
	//
	// Reports the Ranke-Archive as a whole: the **branch-table head** — the id every
	// archive-scoped read is rooted at — with its height and when it last moved, and how
	// many branches the table holds.
	//
	// This is the only route that reports the branch-table head, which is what a client
	// needs to name the `$archive` scope in a query or a grant.
	//
	// Reads the `$archive` scope and requires the **R** right on `$archive`. Cacheable
	// **with revalidation**: the head advances on every contribution.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /archive/info (the `GetArchiveInfo` operationId).
	GetArchiveInfoWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetArchiveInfoResponse, error)

	// ListBranchesWithResponse List the branch table's branches
	//
	// Returns every branch the branch table holds, each with its name and current
	// head id. Reachable **without knowing any branch name**, so a client discovers
	// what it may address before using the routes that take one; an archive with no
	// branches yet answers with an empty list.
	//
	// Requires the **R** right on the reserved `$branches` target, which is what
	// core-access grants as "enumerates the table".
	//
	// Cacheable **with revalidation** (weak `ETag`, `Cache-Control: no-cache`): every
	// head in the list moves as its branch is contributed to. The listing is answered
	// from **one archive snapshot**, so the heads are consistent with each other.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /branches (the `ListBranches` operationId).
	ListBranchesWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListBranchesResponse, error)

	// GetBranchClaimWithResponse Fetch a claim within a branch's closure
	//
	// Returns claim `{id}` as its signed CBOR bytes, **only if it lies in branch
	// `{branch}`'s closure**. A claim that is superseded, contradicted, or otherwise
	// outside the closure returns `404`, indistinguishable from one that does not
	// exist. Requires the **R** right on that branch.
	//
	// `{branch}` names an **ordinary branch**. A reserved scope name supplied here
	// names a branch that does not exist and is answered as `404`; each scope has
	// exactly one route (`/archive/…`, `/universe/…`).
	//
	// Immutably **cacheable** by id (strong `ETag`, `Cache-Control: public,
	// immutable`): the id content-addresses the bytes, so they never change.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /branches/{branch}/claims/{id} (the `GetBranchClaim` operationId).
	GetBranchClaimWithResponse(ctx context.Context, branch BranchName, id ClaimId, reqEditors ...RequestEditorFn) (*GetBranchClaimResponse, error)

	// GetBranchClaimContentWithResponse Fetch the content of a claim within a branch's closure
	//
	// Streams the content of claim `{id}` — **only if it lies in branch `{branch}`'s
	// closure** (same closure guarantee as the claim itself; out-of-closure or
	// unknown → `404`). Requires the **R** right on that branch. Content is addressed
	// by the claim that holds it, not by a raw hash: the server resolves whether the
	// bytes live inline in the claim or in a separate blob, so the client can't tell
	// and doesn't need to — and the read stays scoped as the route is scoped.
	// Immutably **cacheable** by the claim id.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /branches/{branch}/claims/{id}/content (the `GetBranchClaimContent` operationId).
	GetBranchClaimContentWithResponse(ctx context.Context, branch BranchName, id ClaimId, reqEditors ...RequestEditorFn) (*GetBranchClaimContentResponse, error)

	// GetBranchHeadWithResponse Current head id of a branch
	//
	// Returns the branch's current head id — a moving target (it advances on every
	// contribution). Requires the **R** right on that branch. Cacheable **with
	// revalidation** (weak `ETag`, `Cache-Control: no-cache`): a conditional request
	// is cheap when the head has not moved. To inspect the head claim itself, fetch it
	// via `GET /branches/{branch}/claims/{id}`.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /branches/{branch}/head (the `GetBranchHead` operationId).
	GetBranchHeadWithResponse(ctx context.Context, branch BranchName, reqEditors ...RequestEditorFn) (*GetBranchHeadResponse, error)

	// GetBranchInfoWithResponse What is known about a branch
	//
	// Reports a branch beyond its head id: the head's **height** — the generation number
	// of the branch's newest claim, so the depth of what it points at — and **when it last
	// moved**, which is the head claim's `created_at`.
	//
	// Everything here comes from the head claim, so it costs one claim read. A claim count
	// is deliberately absent: counting a branch's claims is a walk of its closure, which is
	// a query (`POST /query`) and not a field.
	//
	// Requires the **R** right on the branch. Cacheable **with revalidation** — every
	// field moves when the branch does.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /branches/{branch}/info (the `GetBranchInfo` operationId).
	GetBranchInfoWithResponse(ctx context.Context, branch BranchName, reqEditors ...RequestEditorFn) (*GetBranchInfoResponse, error)

	// ContributeWithBodyWithResponse Contribute signed claims (atomic)
	//
	// Contributes one or more signed claims to a branch as a single **atomic**
	// merge — all are absorbed under one new branch-table head, or none are.
	// Content-addressed and therefore **idempotent**: re-contributing yields the same
	// ids with no duplicates.
	//
	// The body is ranke's contribution stream: a **CBOR sequence** (RFC 8742) of
	// records, self-framing so a contribution of any size streams.
	//
	//   - `[2, ["<branch>", …]]` — **first**, the branches this contribution touches
	//   - `[0, <id>, <claim bytes>, "<branch>"]` — a claim, as the canonical CBOR its
	//     contributor signed, and the branch it joins
	//   - `[1, <hash>, <content bytes>]` — externalized content, which lives in the
	//     Universe unbranched and so names no branch
	//
	// The header comes first so the **C** right is settled on every declared branch
	// before any of the body is read; a claim naming an undeclared branch is refused, so
	// the declaration binds. One contribution may therefore advance **several branches**,
	// and an unauthorized one is answered without its payload being read.
	//
	// Payloads are CBOR byte strings carried through untouched: a claim's id is a
	// signature over exactly those bytes, so the server stores what it was sent. The id
	// is explicit because it cannot be derived — `Sign(H(S(node)))` is made with the
	// contributor's key, and the canonical encoding carries only the node. Content is
	// checked against the hash addressing it.
	//
	// Send every claim the closure needs that the archive may not hold yet — a
	// first-time contributor includes its own `contribution/contributor` claim, since
	// everything it signs references it.
	//
	// The sequencer mints the `contribution/branches` branch-table claim recording the
	// merge (paper 02 §Sequencer). On success the new branch-table head id and the
	// contributed claim ids are returned.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /contribute (the `Contribute` operationId).
	ContributeWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*ContributeResponse, error)

	// AdvanceDevClockWithBodyWithResponse Advance the dev sequencer's clock
	//
	// Available **only** when the stack was launched with `--dev` against a `dev`
	// Sequencer: moves the clock the Sequencer mints `created_at` and branch-table
	// timestamps from forward to (at least) the given instant, so a client that
	// knows its own story's schedule — a fixture generator, say — can make the
	// archive's *recorded* history track its *narrated* one, one contribution at a
	// time, rather than every merge landing at the real wall-clock moment the
	// client happened to run.
	//
	// The clock never moves backward: a request older than its current position
	// is accepted and answered with the position unchanged. Absent `--dev`, or
	// against a `concurrent` (production) Sequencer, the route is `501` — the
	// witnessed merge time stays real, which is the whole point of `R-C2DATE`.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /dev/clock (the `AdvanceDevClock` operationId).
	AdvanceDevClockWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AdvanceDevClockResponse, error)

	// AdvanceDevClockWithResponse Advance the dev sequencer's clock
	//
	// Available **only** when the stack was launched with `--dev` against a `dev`
	// Sequencer: moves the clock the Sequencer mints `created_at` and branch-table
	// timestamps from forward to (at least) the given instant, so a client that
	// knows its own story's schedule — a fixture generator, say — can make the
	// archive's *recorded* history track its *narrated* one, one contribution at a
	// time, rather than every merge landing at the real wall-clock moment the
	// client happened to run.
	//
	// The clock never moves backward: a request older than its current position
	// is accepted and answered with the position unchanged. Absent `--dev`, or
	// against a `concurrent` (production) Sequencer, the route is `501` — the
	// witnessed merge time stays real, which is the whole point of `R-C2DATE`.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /dev/clock (the `AdvanceDevClock` operationId).
	AdvanceDevClockWithResponse(ctx context.Context, body AdvanceDevClockJSONRequestBody, reqEditors ...RequestEditorFn) (*AdvanceDevClockResponse, error)

	// HealthWithResponse Liveness and signer identity
	//
	// Reports that the stack is up and the signing/contributor identity it
	// attests merges under. Whether this requires a privileged subject is a
	// core-access decision, not part of this contract.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /health (the `Health` operationId).
	HealthWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*HealthResponse, error)

	// QueryWithBodyWithResponse Read the graph with a declarative query
	//
	// Runs a RankeQL query (§RankeQL) and streams the result set, one item per
	// result, in the serialization chosen by `output.encoding`. Results carry the
	// natural `(created_at, id)` order unless `order` sorts them, with its keys
	// applied in priority order and that natural order breaking any remaining ties;
	// to page, carry the last result's order key into the next request's `where`
	// (pin `select.head` so the closure cannot shift between pages).
	//
	// When `execution.report` names a verbosity, the **final item** in the sequence
	// is a `QueryReport` (see the schema) — typed distinctly from result items and
	// always last — carrying the execution log, timing, and whether a limit truncated
	// the read. `execution.layer` pins which storage layer runs it.
	//
	// The response media type mirrors `output.encoding`: `application/json-seq` or
	// `application/cbor-seq`. A branch named in `select` that does not exist is
	// `404`; claims outside the scope's closure simply do not appear. `$universe`
	// is the privileged unconfined read and requires `select.head`.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /query (the `Query` operationId).
	QueryWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*QueryResponse, error)

	// QueryWithResponse Read the graph with a declarative query
	//
	// Runs a RankeQL query (§RankeQL) and streams the result set, one item per
	// result, in the serialization chosen by `output.encoding`. Results carry the
	// natural `(created_at, id)` order unless `order` sorts them, with its keys
	// applied in priority order and that natural order breaking any remaining ties;
	// to page, carry the last result's order key into the next request's `where`
	// (pin `select.head` so the closure cannot shift between pages).
	//
	// When `execution.report` names a verbosity, the **final item** in the sequence
	// is a `QueryReport` (see the schema) — typed distinctly from result items and
	// always last — carrying the execution log, timing, and whether a limit truncated
	// the read. `execution.layer` pins which storage layer runs it.
	//
	// The response media type mirrors `output.encoding`: `application/json-seq` or
	// `application/cbor-seq`. A branch named in `select` that does not exist is
	// `404`; claims outside the scope's closure simply do not appear. `$universe`
	// is the privileged unconfined read and requires `select.head`.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /query (the `Query` operationId).
	QueryWithResponse(ctx context.Context, body QueryJSONRequestBody, reqEditors ...RequestEditorFn) (*QueryResponse, error)

	// ListStorageLayersWithResponse List storage layers
	//
	// Lists the stack's storage layers (read-through tiers) by **name and type
	// only** — never connection details or secrets. Naming layers is what lets a
	// verification run target one directly (a read-through view can mask the loss
	// of an object on a deeper layer).
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /system/layers (the `ListStorageLayers` operationId).
	ListStorageLayersWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListStorageLayersResponse, error)

	// ListVerificationsWithResponse List verification runs
	//
	// Verification runs across the whole stack, newest first. Each report is a
	// **point-in-time record**: a layer repaired externally shows clean in a later
	// run, so reports accumulate rather than overwrite — until explicitly removed
	// with `DELETE /system/verifications/{reportId}`.
	//
	// The API lives under `/system/` because a verification run is a ranke-db
	// extension beyond the paper's surface rather than archive content: it is a
	// stack-wide operational resource, rooted at a closure named in the request body
	// and not in the path. (Branch reads no longer occupy the root, so nothing here
	// is avoiding a collision.)
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /system/verifications (the `ListVerifications` operationId).
	ListVerificationsWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*ListVerificationsResponse, error)

	// StartVerificationWithBodyWithResponse Start a verification run
	//
	// Starts a run from a `VerificationConfig`: walk the closure rooted at
	// `closure` (a branch name — resolved to its current head and **pinned** for
	// the life of the run — or a head id directly), reading the named `layer`
	// directly, re-checking each claim to the configured depth. It returns
	// *findings*, not contents, so it never leaks across closures.
	//
	// A run may take a **very long time** (hours to days over a large closure at
	// full-content depth), so it is always **asynchronous**: the call returns `202`
	// immediately with the running report and a `Location` header pointing at the
	// report resource. Poll it with `GET /system/verifications/{reportId}`, pacing
	// by the `Retry-After` hint; stop it with `DELETE`. Starting the same run twice
	// yields two independent point-in-time reports (runs are not deduplicated).
	//
	// Verification is resource-heavy, so the stack caps the number of runs that may
	// execute **concurrently** (configured; default 1). When that cap is already
	// reached the call returns `429` — the server never stops a run to make room. To
	// proceed, either wait (per `Retry-After`) or `GET /system/verifications` to see
	// what is running and free a slot deliberately: `cancel` a run to stop it while
	// keeping its report, or `DELETE` it to remove it entirely.
	//
	// Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /system/verifications (the `StartVerification` operationId).
	StartVerificationWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StartVerificationResponse, error)

	// StartVerificationWithResponse Start a verification run
	//
	// Starts a run from a `VerificationConfig`: walk the closure rooted at
	// `closure` (a branch name — resolved to its current head and **pinned** for
	// the life of the run — or a head id directly), reading the named `layer`
	// directly, re-checking each claim to the configured depth. It returns
	// *findings*, not contents, so it never leaks across closures.
	//
	// A run may take a **very long time** (hours to days over a large closure at
	// full-content depth), so it is always **asynchronous**: the call returns `202`
	// immediately with the running report and a `Location` header pointing at the
	// report resource. Poll it with `GET /system/verifications/{reportId}`, pacing
	// by the `Retry-After` hint; stop it with `DELETE`. Starting the same run twice
	// yields two independent point-in-time reports (runs are not deduplicated).
	//
	// Verification is resource-heavy, so the stack caps the number of runs that may
	// execute **concurrently** (configured; default 1). When that cap is already
	// reached the call returns `429` — the server never stops a run to make room. To
	// proceed, either wait (per `Retry-After`) or `GET /system/verifications` to see
	// what is running and free a slot deliberately: `cancel` a run to stop it while
	// keeping its report, or `DELETE` it to remove it entirely.
	//
	// Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /system/verifications (the `StartVerification` operationId).
	StartVerificationWithResponse(ctx context.Context, body StartVerificationJSONRequestBody, reqEditors ...RequestEditorFn) (*StartVerificationResponse, error)

	// DeleteVerificationWithResponse Delete a verification run
	//
	// Really deletes the run and its report. If the run is still `running` it is
	// stopped first, then the record is removed — so this both aborts a run and
	// cleans up finished history in one step. Unlike the cancel action, nothing
	// survives: a subsequent `GET` is `404`. Either verb frees a concurrency slot;
	// cancel keeps the report, delete removes it.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with DELETE /system/verifications/{reportId} (the `DeleteVerification` operationId).
	DeleteVerificationWithResponse(ctx context.Context, reportId string, reqEditors ...RequestEditorFn) (*DeleteVerificationResponse, error)

	// GetVerificationWithResponse Show a verification run
	//
	// The report for a run. Poll until `status` leaves `running`; while it is still
	// running the response carries a `Retry-After` hint and the progress counters
	// (`claimsChecked`, `bytesRead`) advance between polls.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /system/verifications/{reportId} (the `GetVerification` operationId).
	GetVerificationWithResponse(ctx context.Context, reportId string, reqEditors ...RequestEditorFn) (*GetVerificationResponse, error)

	// CancelVerificationWithResponse Cancel a running verification run
	//
	// Stops a `running` run but **keeps** its report: the record stays in history
	// with `status` `stopped` and whatever partial findings it had gathered, and the
	// concurrency slot is freed. Use this to abort a run you want to keep a record
	// of; use `DELETE` to remove it entirely. Idempotent — cancelling a run that has
	// already finished or stopped returns its current report unchanged.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with POST /system/verifications/{reportId}/cancel (the `CancelVerification` operationId).
	CancelVerificationWithResponse(ctx context.Context, reportId string, reqEditors ...RequestEditorFn) (*CancelVerificationResponse, error)

	// WhoamiWithResponse What this credential may do
	//
	// Reports the caller back to itself: the account its credential resolved to,
	// that account's grants, and any caveats attenuating them. It answers about
	// **this server's** access policy, never about the graph, which is why it sits
	// under `/system`.
	//
	// Needs no grant — a caller learns only what it already proved by
	// authenticating, and nothing about any other account. A bad credential is
	// still `401`, so this doubles as the side-effect-free way to check one.
	//
	// `grants` and `caveats` are reported separately rather than intersected: a
	// request is allowed when the account's grants permit it **and** every caveat
	// still does, so seeing both is what explains a refusal. A token narrowed by
	// attenuation has no other way to show what survived.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /system/whoami (the `Whoami` operationId).
	WhoamiWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*WhoamiResponse, error)

	// GetClaimWithResponse Fetch a claim by id from the Universe (privileged)
	//
	// Returns claim `{id}` as its signed CBOR bytes from the Universe under **no
	// closure at all** — no branch table, and no confinement to the current head.
	// This is what makes it privileged, and what it exists for: reaching an archive
	// from a Universe and a head id alone, as when restoring from a head kept outside
	// the server. A claim the Universe holds is returned even where
	// `GET /archive/claims/{id}` reports it not-found.
	//
	// This collection reads the `$universe` scope: the same scope a RankeQL body names
	// as `select.branch: "$universe"`, and the same target a grant is written against.
	// It requires the **R** right on `$universe`, to which only **R** applies. An
	// ordinary glob confers it by no accident — a `$`-prefixed target needs an exact
	// grant, so `R *` reaches neither reserved scope.
	//
	// Immutably cacheable by id.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /universe/claims/{id} (the `GetClaim` operationId).
	GetClaimWithResponse(ctx context.Context, id ClaimId, reqEditors ...RequestEditorFn) (*GetClaimResponse, error)

	// GetClaimContentWithResponse Fetch the content of a claim by id from the Universe (privileged)
	//
	// Streams the content of claim `{id}` from the Universe under no closure — the
	// privileged read, conferred only through **R** on `$universe`. Content is
	// addressed by the claim; whether the bytes are inline or a separate blob is
	// hidden. Immutably cacheable by the claim id.
	//
	// Returns a wrapper object for the known response body format(s).
	//
	// Corresponds with GET /universe/claims/{id}/content (the `GetClaimContent` operationId).
	GetClaimContentWithResponse(ctx context.Context, id ClaimId, reqEditors ...RequestEditorFn) (*GetClaimContentResponse, error)
}

ClientWithResponsesInterface is the interface specification for the client with responses above.

type Comparison

type Comparison struct {
	// Eq A value a comparison tests against. On a field V-TIME or V-DATED governs it MUST take that field's own form — a V-TIME timestamp on a V-TIME field, an EDTF Level 1 value on a V-DATED field — and anything else, a glob included, is rejected rather than coerced (R-QTIMEOP); an interval is a pair of bounds. The form binds the value as encoded here, so a binding may take its own language's temporal type provided it renders it into that form. Otherwise how two values compare is the engine's.
	Eq *Value `json:"eq,omitempty"`

	// Ge A value a comparison tests against. On a field V-TIME or V-DATED governs it MUST take that field's own form — a V-TIME timestamp on a V-TIME field, an EDTF Level 1 value on a V-DATED field — and anything else, a glob included, is rejected rather than coerced (R-QTIMEOP); an interval is a pair of bounds. The form binds the value as encoded here, so a binding may take its own language's temporal type provided it renders it into that form. Otherwise how two values compare is the engine's.
	Ge *Value `json:"ge,omitempty"`

	// Glob Shell-style wildcard.
	Glob *string `json:"glob,omitempty"`

	// Gt A value a comparison tests against. On a field V-TIME or V-DATED governs it MUST take that field's own form — a V-TIME timestamp on a V-TIME field, an EDTF Level 1 value on a V-DATED field — and anything else, a glob included, is rejected rather than coerced (R-QTIMEOP); an interval is a pair of bounds. The form binds the value as encoded here, so a binding may take its own language's temporal type provided it renders it into that form. Otherwise how two values compare is the engine's.
	Gt *Value `json:"gt,omitempty"`

	// In Set membership.
	In *[]Value `json:"in,omitempty"`

	// Le A value a comparison tests against. On a field V-TIME or V-DATED governs it MUST take that field's own form — a V-TIME timestamp on a V-TIME field, an EDTF Level 1 value on a V-DATED field — and anything else, a glob included, is rejected rather than coerced (R-QTIMEOP); an interval is a pair of bounds. The form binds the value as encoded here, so a binding may take its own language's temporal type provided it renders it into that form. Otherwise how two values compare is the engine's.
	Le *Value `json:"le,omitempty"`

	// Lt A value a comparison tests against. On a field V-TIME or V-DATED governs it MUST take that field's own form — a V-TIME timestamp on a V-TIME field, an EDTF Level 1 value on a V-DATED field — and anything else, a glob included, is rejected rather than coerced (R-QTIMEOP); an interval is a pair of bounds. The form binds the value as encoded here, so a binding may take its own language's temporal type provided it renders it into that form. Otherwise how two values compare is the engine's.
	Lt *Value `json:"lt,omitempty"`

	// Ne A value a comparison tests against. On a field V-TIME or V-DATED governs it MUST take that field's own form — a V-TIME timestamp on a V-TIME field, an EDTF Level 1 value on a V-DATED field — and anything else, a glob included, is rejected rather than coerced (R-QTIMEOP); an interval is a pair of bounds. The form binds the value as encoded here, so a binding may take its own language's temporal type provided it renders it into that form. Otherwise how two values compare is the engine's.
	Ne *Value `json:"ne,omitempty"`
}

Comparison One operator applied to one field. eq, ne, lt, le, gt and ge take a value, in a set, glob a shell-style wildcard. Exactly one is present.

type Conflict

type Conflict = Error

Conflict defines model for Conflict.

type ContributeResponse

type ContributeResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON201 the response for an HTTP 201 `application/json` response
	JSON201 *ContributionResult
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// JSON409 the response for an HTTP 409 `application/json` response
	JSON409 *Conflict
}

func ParseContributeResponse

func ParseContributeResponse(rsp *http.Response) (*ContributeResponse, error)

ParseContributeResponse parses an HTTP response from a ContributeWithResponse call

func (ContributeResponse) ContentType

func (r ContributeResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ContributeResponse) GetBody

func (r ContributeResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ContributeResponse) GetJSON201

func (r ContributeResponse) GetJSON201() *ContributionResult

GetJSON201 returns the response for an HTTP 201 `application/json` response

func (ContributeResponse) GetJSON400

func (r ContributeResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (ContributeResponse) GetJSON401

func (r ContributeResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ContributeResponse) GetJSON403

func (r ContributeResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ContributeResponse) GetJSON404

func (r ContributeResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (ContributeResponse) GetJSON409

func (r ContributeResponse) GetJSON409() *Conflict

GetJSON409 returns the response for an HTTP 409 `application/json` response

func (ContributeResponse) Status

func (r ContributeResponse) Status() string

Status returns HTTPResponse.Status

func (ContributeResponse) StatusCode

func (r ContributeResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ContributionResult

type ContributionResult struct {
	// Head The new branch-table head id after the merge.
	Head string `json:"head"`

	// Ids Content-addressed ids of the contributed claims, in order.
	Ids []string `json:"ids"`
}

ContributionResult The outcome of a contribution — the new branch-table head and the appended claim ids.

type DeleteVerificationResponse

type DeleteVerificationResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
}

func ParseDeleteVerificationResponse

func ParseDeleteVerificationResponse(rsp *http.Response) (*DeleteVerificationResponse, error)

ParseDeleteVerificationResponse parses an HTTP response from a DeleteVerificationWithResponse call

func (DeleteVerificationResponse) ContentType

func (r DeleteVerificationResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (DeleteVerificationResponse) GetBody

func (r DeleteVerificationResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (DeleteVerificationResponse) GetJSON401

func (r DeleteVerificationResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (DeleteVerificationResponse) GetJSON403

func (r DeleteVerificationResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (DeleteVerificationResponse) GetJSON404

func (r DeleteVerificationResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (DeleteVerificationResponse) Status

Status returns HTTPResponse.Status

func (DeleteVerificationResponse) StatusCode

func (r DeleteVerificationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type DevClock

type DevClock struct {
	Time time.Time `json:"time"`
}

DevClock The dev sequencer's clock after the request — the later of what was asked and what it already held.

type DevClockAdvance

type DevClockAdvance struct {
	// Time The instant to advance to.
	Time time.Time `json:"time"`
}

DevClockAdvance Requests the dev sequencer's clock advance to (at least) this instant. A request older than the clock's current position is accepted as a no-op — the clock only ever moves forward, since a merge's witnessed time regressing would break every guarantee built on it.

type Duration

type Duration = string

Duration A duration as a decimal sequence with unit suffixes — ns, us, ms, s, m, h — e.g. 5s or 1m30s. The bare 0 means unbounded.

type Error

type Error struct {
	// Code Machine-readable failure category, stable across releases — one of
	// unauthenticated, forbidden, not_found, conflict, busy, invalid,
	// unimplemented, internal. Clients branch on this, not on the message.
	Code string `json:"code"`

	// Error Human-readable message. Carries no subject id, even on 403.
	Error string `json:"error"`
}

Error defines model for Error.

type Execution

type Execution struct {
	// Layer Pins the query to one named storage or execution layer; absent, the backend chooses by capability.
	Layer *string `json:"layer,omitempty"`

	// Report Report verbosity: info gives high-level stages, debug routing and translation, trace per-claim detail. Set, and only then, the stream carries one final report record after the last element, typed distinctly from result claims (R-QREPORT).
	Report *ExecutionReport `json:"report,omitempty"`
}

Execution Where the query runs and how it reports on itself. These controls reach execution and diagnostics, and never the result set.

type ExecutionReport

type ExecutionReport string

ExecutionReport Report verbosity: info gives high-level stages, debug routing and translation, trace per-claim detail. Set, and only then, the stream carries one final report record after the last element, typed distinctly from result claims (R-QREPORT).

const (
	Debug ExecutionReport = "debug"
	Info  ExecutionReport = "info"
	Trace ExecutionReport = "trace"
)

Defines values for ExecutionReport.

func (ExecutionReport) Valid

func (e ExecutionReport) Valid() bool

Valid indicates whether the value is a known member of the ExecutionReport enum.

type Forbidden

type Forbidden = Error

Forbidden defines model for Forbidden.

type GetArchiveClaimContentResponse

type GetArchiveClaimContentResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetArchiveClaimContentResponse200Headers
}

func ParseGetArchiveClaimContentResponse

func ParseGetArchiveClaimContentResponse(rsp *http.Response) (*GetArchiveClaimContentResponse, error)

ParseGetArchiveClaimContentResponse parses an HTTP response from a GetArchiveClaimContentWithResponse call

func (GetArchiveClaimContentResponse) ContentType

func (r GetArchiveClaimContentResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetArchiveClaimContentResponse) GetBody

func (r GetArchiveClaimContentResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetArchiveClaimContentResponse) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetArchiveClaimContentResponse) GetJSON403

func (r GetArchiveClaimContentResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetArchiveClaimContentResponse) GetJSON404

func (r GetArchiveClaimContentResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetArchiveClaimContentResponse) Status

Status returns HTTPResponse.Status

func (GetArchiveClaimContentResponse) StatusCode

func (r GetArchiveClaimContentResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetArchiveClaimContentResponse200Headers

type GetArchiveClaimContentResponse200Headers struct {
	ETag *string
}

GetArchiveClaimContentResponse200Headers the declared response headers of an HTTP 200 response for GetArchiveClaimContent

type GetArchiveClaimResponse

type GetArchiveClaimResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetArchiveClaimResponse200Headers
}

func ParseGetArchiveClaimResponse

func ParseGetArchiveClaimResponse(rsp *http.Response) (*GetArchiveClaimResponse, error)

ParseGetArchiveClaimResponse parses an HTTP response from a GetArchiveClaimWithResponse call

func (GetArchiveClaimResponse) ContentType

func (r GetArchiveClaimResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetArchiveClaimResponse) GetBody

func (r GetArchiveClaimResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetArchiveClaimResponse) GetJSON401

func (r GetArchiveClaimResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetArchiveClaimResponse) GetJSON403

func (r GetArchiveClaimResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetArchiveClaimResponse) GetJSON404

func (r GetArchiveClaimResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetArchiveClaimResponse) Status

func (r GetArchiveClaimResponse) Status() string

Status returns HTTPResponse.Status

func (GetArchiveClaimResponse) StatusCode

func (r GetArchiveClaimResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetArchiveClaimResponse200Headers

type GetArchiveClaimResponse200Headers struct {
	ETag *string
}

GetArchiveClaimResponse200Headers the declared response headers of an HTTP 200 response for GetArchiveClaim

type GetArchiveInfoResponse

type GetArchiveInfoResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *ArchiveInfo
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetArchiveInfoResponse200Headers
}

func ParseGetArchiveInfoResponse

func ParseGetArchiveInfoResponse(rsp *http.Response) (*GetArchiveInfoResponse, error)

ParseGetArchiveInfoResponse parses an HTTP response from a GetArchiveInfoWithResponse call

func (GetArchiveInfoResponse) ContentType

func (r GetArchiveInfoResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetArchiveInfoResponse) GetBody

func (r GetArchiveInfoResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetArchiveInfoResponse) GetJSON200

func (r GetArchiveInfoResponse) GetJSON200() *ArchiveInfo

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetArchiveInfoResponse) GetJSON401

func (r GetArchiveInfoResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetArchiveInfoResponse) GetJSON403

func (r GetArchiveInfoResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetArchiveInfoResponse) Status

func (r GetArchiveInfoResponse) Status() string

Status returns HTTPResponse.Status

func (GetArchiveInfoResponse) StatusCode

func (r GetArchiveInfoResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetArchiveInfoResponse200Headers

type GetArchiveInfoResponse200Headers struct {
	ETag *string
}

GetArchiveInfoResponse200Headers the declared response headers of an HTTP 200 response for GetArchiveInfo

type GetBranchClaimContentResponse

type GetBranchClaimContentResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetBranchClaimContentResponse200Headers
}

func ParseGetBranchClaimContentResponse

func ParseGetBranchClaimContentResponse(rsp *http.Response) (*GetBranchClaimContentResponse, error)

ParseGetBranchClaimContentResponse parses an HTTP response from a GetBranchClaimContentWithResponse call

func (GetBranchClaimContentResponse) ContentType

func (r GetBranchClaimContentResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetBranchClaimContentResponse) GetBody

func (r GetBranchClaimContentResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetBranchClaimContentResponse) GetJSON401

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetBranchClaimContentResponse) GetJSON403

func (r GetBranchClaimContentResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetBranchClaimContentResponse) GetJSON404

func (r GetBranchClaimContentResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetBranchClaimContentResponse) Status

Status returns HTTPResponse.Status

func (GetBranchClaimContentResponse) StatusCode

func (r GetBranchClaimContentResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetBranchClaimContentResponse200Headers

type GetBranchClaimContentResponse200Headers struct {
	ETag *string
}

GetBranchClaimContentResponse200Headers the declared response headers of an HTTP 200 response for GetBranchClaimContent

type GetBranchClaimResponse

type GetBranchClaimResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetBranchClaimResponse200Headers
}

func ParseGetBranchClaimResponse

func ParseGetBranchClaimResponse(rsp *http.Response) (*GetBranchClaimResponse, error)

ParseGetBranchClaimResponse parses an HTTP response from a GetBranchClaimWithResponse call

func (GetBranchClaimResponse) ContentType

func (r GetBranchClaimResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetBranchClaimResponse) GetBody

func (r GetBranchClaimResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetBranchClaimResponse) GetJSON401

func (r GetBranchClaimResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetBranchClaimResponse) GetJSON403

func (r GetBranchClaimResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetBranchClaimResponse) GetJSON404

func (r GetBranchClaimResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetBranchClaimResponse) Status

func (r GetBranchClaimResponse) Status() string

Status returns HTTPResponse.Status

func (GetBranchClaimResponse) StatusCode

func (r GetBranchClaimResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetBranchClaimResponse200Headers

type GetBranchClaimResponse200Headers struct {
	ETag *string
}

GetBranchClaimResponse200Headers the declared response headers of an HTTP 200 response for GetBranchClaim

type GetBranchHeadResponse

type GetBranchHeadResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *BranchHead
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetBranchHeadResponse200Headers
}

func ParseGetBranchHeadResponse

func ParseGetBranchHeadResponse(rsp *http.Response) (*GetBranchHeadResponse, error)

ParseGetBranchHeadResponse parses an HTTP response from a GetBranchHeadWithResponse call

func (GetBranchHeadResponse) ContentType

func (r GetBranchHeadResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetBranchHeadResponse) GetBody

func (r GetBranchHeadResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetBranchHeadResponse) GetJSON200

func (r GetBranchHeadResponse) GetJSON200() *BranchHead

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetBranchHeadResponse) GetJSON401

func (r GetBranchHeadResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetBranchHeadResponse) GetJSON403

func (r GetBranchHeadResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetBranchHeadResponse) GetJSON404

func (r GetBranchHeadResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetBranchHeadResponse) Status

func (r GetBranchHeadResponse) Status() string

Status returns HTTPResponse.Status

func (GetBranchHeadResponse) StatusCode

func (r GetBranchHeadResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetBranchHeadResponse200Headers

type GetBranchHeadResponse200Headers struct {
	ETag *string
}

GetBranchHeadResponse200Headers the declared response headers of an HTTP 200 response for GetBranchHead

type GetBranchInfoResponse

type GetBranchInfoResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *BranchInfo
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetBranchInfoResponse200Headers
}

func ParseGetBranchInfoResponse

func ParseGetBranchInfoResponse(rsp *http.Response) (*GetBranchInfoResponse, error)

ParseGetBranchInfoResponse parses an HTTP response from a GetBranchInfoWithResponse call

func (GetBranchInfoResponse) ContentType

func (r GetBranchInfoResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetBranchInfoResponse) GetBody

func (r GetBranchInfoResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetBranchInfoResponse) GetJSON200

func (r GetBranchInfoResponse) GetJSON200() *BranchInfo

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetBranchInfoResponse) GetJSON401

func (r GetBranchInfoResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetBranchInfoResponse) GetJSON403

func (r GetBranchInfoResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetBranchInfoResponse) GetJSON404

func (r GetBranchInfoResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetBranchInfoResponse) Status

func (r GetBranchInfoResponse) Status() string

Status returns HTTPResponse.Status

func (GetBranchInfoResponse) StatusCode

func (r GetBranchInfoResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetBranchInfoResponse200Headers

type GetBranchInfoResponse200Headers struct {
	ETag *string
}

GetBranchInfoResponse200Headers the declared response headers of an HTTP 200 response for GetBranchInfo

type GetClaimContentResponse

type GetClaimContentResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetClaimContentResponse200Headers
}

func ParseGetClaimContentResponse

func ParseGetClaimContentResponse(rsp *http.Response) (*GetClaimContentResponse, error)

ParseGetClaimContentResponse parses an HTTP response from a GetClaimContentWithResponse call

func (GetClaimContentResponse) ContentType

func (r GetClaimContentResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetClaimContentResponse) GetBody

func (r GetClaimContentResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetClaimContentResponse) GetJSON401

func (r GetClaimContentResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetClaimContentResponse) GetJSON403

func (r GetClaimContentResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetClaimContentResponse) GetJSON404

func (r GetClaimContentResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetClaimContentResponse) Status

func (r GetClaimContentResponse) Status() string

Status returns HTTPResponse.Status

func (GetClaimContentResponse) StatusCode

func (r GetClaimContentResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetClaimContentResponse200Headers

type GetClaimContentResponse200Headers struct {
	ETag *string
}

GetClaimContentResponse200Headers the declared response headers of an HTTP 200 response for GetClaimContent

type GetClaimResponse

type GetClaimResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetClaimResponse200Headers
}

func ParseGetClaimResponse

func ParseGetClaimResponse(rsp *http.Response) (*GetClaimResponse, error)

ParseGetClaimResponse parses an HTTP response from a GetClaimWithResponse call

func (GetClaimResponse) ContentType

func (r GetClaimResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetClaimResponse) GetBody

func (r GetClaimResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetClaimResponse) GetJSON401

func (r GetClaimResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetClaimResponse) GetJSON403

func (r GetClaimResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetClaimResponse) GetJSON404

func (r GetClaimResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetClaimResponse) Status

func (r GetClaimResponse) Status() string

Status returns HTTPResponse.Status

func (GetClaimResponse) StatusCode

func (r GetClaimResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetClaimResponse200Headers

type GetClaimResponse200Headers struct {
	ETag *string
}

GetClaimResponse200Headers the declared response headers of an HTTP 200 response for GetClaim

type GetVerificationResponse

type GetVerificationResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *VerificationReport
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *GetVerificationResponse200Headers
}

func ParseGetVerificationResponse

func ParseGetVerificationResponse(rsp *http.Response) (*GetVerificationResponse, error)

ParseGetVerificationResponse parses an HTTP response from a GetVerificationWithResponse call

func (GetVerificationResponse) ContentType

func (r GetVerificationResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (GetVerificationResponse) GetBody

func (r GetVerificationResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (GetVerificationResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (GetVerificationResponse) GetJSON401

func (r GetVerificationResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (GetVerificationResponse) GetJSON403

func (r GetVerificationResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (GetVerificationResponse) GetJSON404

func (r GetVerificationResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (GetVerificationResponse) Status

func (r GetVerificationResponse) Status() string

Status returns HTTPResponse.Status

func (GetVerificationResponse) StatusCode

func (r GetVerificationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type GetVerificationResponse200Headers

type GetVerificationResponse200Headers struct {
	RetryAfter *int
}

GetVerificationResponse200Headers the declared response headers of an HTTP 200 response for GetVerification

type Health

type Health struct {
	// Signer The contributor identity this stack signs merges with.
	//
	// Example: did:key:z6Mk...
	Signer *string `json:"signer,omitempty"`

	// Status Example: ok
	Status string `json:"status"`

	// Version The server build answering this request. A release names itself exactly;
	// a build from a checkout names its revision, marked when the tree carried
	// uncommitted changes.
	//
	//
	// Example: v1.19.2
	Version string `json:"version"`
}

Health defines model for Health.

type HealthResponse

type HealthResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Health
}

func ParseHealthResponse

func ParseHealthResponse(rsp *http.Response) (*HealthResponse, error)

ParseHealthResponse parses an HTTP response from a HealthWithResponse call

func (HealthResponse) ContentType

func (r HealthResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (HealthResponse) GetBody

func (r HealthResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (HealthResponse) GetJSON200

func (r HealthResponse) GetJSON200() *Health

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (HealthResponse) Status

func (r HealthResponse) Status() string

Status returns HTTPResponse.Status

func (HealthResponse) StatusCode

func (r HealthResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type HttpRequestDoer

type HttpRequestDoer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer performs HTTP requests.

The standard http.Client implements this interface.

type Id

type Id = string

Id A claim id: id(v) = Sign(H(S(v))) for a node, id(e) = H(S(e)) for an edge, carried as multibase base32 of the self-describing payload. The pattern fixes the multibase framing; whether the payload's multihash or multikey framing parses is the implementation's check.

type Limit

type Limit struct {
	// Results Caps the claim count; 0 is unbounded.
	Results *int `json:"results,omitempty"`

	// Time A duration as a decimal sequence with unit suffixes — ns, us, ms, s, m, h — e.g. 5s or 1m30s. The bare 0 means unbounded.
	Time *Duration `json:"time,omitempty"`
}

Limit Bounds the read. A read cut short by either bound is a complete answer to the query as bounded, not an error (R-QLIMIT).

type ListBranchesResponse

type ListBranchesResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *BranchList
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// Headers200 the parsed response headers for an HTTP 200 response
	Headers200 *ListBranchesResponse200Headers
}

func ParseListBranchesResponse

func ParseListBranchesResponse(rsp *http.Response) (*ListBranchesResponse, error)

ParseListBranchesResponse parses an HTTP response from a ListBranchesWithResponse call

func (ListBranchesResponse) ContentType

func (r ListBranchesResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListBranchesResponse) GetBody

func (r ListBranchesResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListBranchesResponse) GetJSON200

func (r ListBranchesResponse) GetJSON200() *BranchList

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListBranchesResponse) GetJSON401

func (r ListBranchesResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListBranchesResponse) GetJSON403

func (r ListBranchesResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ListBranchesResponse) Status

func (r ListBranchesResponse) Status() string

Status returns HTTPResponse.Status

func (ListBranchesResponse) StatusCode

func (r ListBranchesResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListBranchesResponse200Headers

type ListBranchesResponse200Headers struct {
	ETag *string
}

ListBranchesResponse200Headers the declared response headers of an HTTP 200 response for ListBranches

type ListStorageLayersResponse

type ListStorageLayersResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *StorageLayerList
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
}

func ParseListStorageLayersResponse

func ParseListStorageLayersResponse(rsp *http.Response) (*ListStorageLayersResponse, error)

ParseListStorageLayersResponse parses an HTTP response from a ListStorageLayersWithResponse call

func (ListStorageLayersResponse) ContentType

func (r ListStorageLayersResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListStorageLayersResponse) GetBody

func (r ListStorageLayersResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListStorageLayersResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListStorageLayersResponse) GetJSON401

func (r ListStorageLayersResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListStorageLayersResponse) GetJSON403

func (r ListStorageLayersResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ListStorageLayersResponse) Status

func (r ListStorageLayersResponse) Status() string

Status returns HTTPResponse.Status

func (ListStorageLayersResponse) StatusCode

func (r ListStorageLayersResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type ListVerificationsResponse

type ListVerificationsResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *VerificationReportList
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
}

func ParseListVerificationsResponse

func ParseListVerificationsResponse(rsp *http.Response) (*ListVerificationsResponse, error)

ParseListVerificationsResponse parses an HTTP response from a ListVerificationsWithResponse call

func (ListVerificationsResponse) ContentType

func (r ListVerificationsResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (ListVerificationsResponse) GetBody

func (r ListVerificationsResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (ListVerificationsResponse) GetJSON200

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (ListVerificationsResponse) GetJSON401

func (r ListVerificationsResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (ListVerificationsResponse) GetJSON403

func (r ListVerificationsResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (ListVerificationsResponse) Status

func (r ListVerificationsResponse) Status() string

Status returns HTTPResponse.Status

func (ListVerificationsResponse) StatusCode

func (r ListVerificationsResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type NotFound

type NotFound = Error

NotFound defines model for NotFound.

type NotImplemented

type NotImplemented = Error

NotImplemented defines model for NotImplemented.

type Order

type Order = []OrderKey

Order Sort keys applied in priority order. Claims lacking a key's field sort last, and the archive's natural (created_at, id) order breaks any remaining ties, so the sort always resolves to a total order (R-QSORT).

type OrderKey

type OrderKey struct {
	// Compare How the values compare (R-QSORT). temporal reads each value as the span of time it denotes and orders by that span's midpoint in nanoseconds, so EDTF dates and instants compare on one axis (R-QTEMPORAL).
	Compare *OrderKeyCompare `json:"compare,omitempty"`

	// Dir Sort direction (R-QSORT).
	Dir *OrderKeyDir `json:"dir,omitempty"`

	// Field The field sorted on — any field a claim carries, height included.
	Field string `json:"field"`
}

OrderKey defines model for OrderKey.

type OrderKeyCompare

type OrderKeyCompare string

OrderKeyCompare How the values compare (R-QSORT). temporal reads each value as the span of time it denotes and orders by that span's midpoint in nanoseconds, so EDTF dates and instants compare on one axis (R-QTEMPORAL).

const (
	Lexical  OrderKeyCompare = "lexical"
	Numeric  OrderKeyCompare = "numeric"
	Temporal OrderKeyCompare = "temporal"
)

Defines values for OrderKeyCompare.

func (OrderKeyCompare) Valid

func (e OrderKeyCompare) Valid() bool

Valid indicates whether the value is a known member of the OrderKeyCompare enum.

type OrderKeyDir

type OrderKeyDir string

OrderKeyDir Sort direction (R-QSORT).

const (
	Asc  OrderKeyDir = "asc"
	Desc OrderKeyDir = "desc"
)

Defines values for OrderKeyDir.

func (OrderKeyDir) Valid

func (e OrderKeyDir) Valid() bool

Valid indicates whether the value is a known member of the OrderKeyDir enum.

type Output

type Output struct {
	// Content Inline content per claim. Absent, no content is inlined (R-QCONTENT).
	Content *OutputContent `json:"content,omitempty"`

	// Detail What each element carries: id (the id alone), claims (a record the engine assembles, shaped by form and content), or envelope (the stored bytes copied out whole, the only output a client can hash against an id; form and content do not apply, and both form: materialized and encoding: json are rejected with it). Under shape: path it applies to every claim in the route (R-QDETAIL, R-QCANON).
	Detail *OutputDetail `json:"detail,omitempty"`

	// Encoding json is text with content base64-encoded, cbor is binary; the same information either way (R-QENCODING).
	Encoding *OutputEncoding `json:"encoding,omitempty"`

	// Form Which field values a claim carries: original as written, a diff-overlaid claim's delta; materialized with any contribution/diff chain resolved over the predecessor it references, recursively to a base claim. A property of the values, hence orthogonal to detail and encoding (R-QFORM).
	Form *OutputForm `json:"form,omitempty"`

	// Shape single yields the reached endpoints, one element each; path yields routes, each running outward from the frontier claim its walk began at (R-QSHAPE).
	Shape *OutputShape `json:"shape,omitempty"`
}

Output Shapes each result along orthogonal axes. detail: claims with form: original and encoding: cbor reproduces the canonical serialization S(v) a claim's id is computed over, and is the only output form directly verifiable against that id (R-QCANON).

type OutputContent

type OutputContent struct {
	// Max Cap in bytes on the content inlined per claim; 0 inlines every claim's content in full.
	Max int `json:"max"`

	// Overflow What becomes of content past the cap: cutoff inlines the bytes up to it, omit inlines whole values only. Absent, omit. A claim keeps every field it carries either way (R-QCONTENT).
	Overflow *OutputContentOverflow `json:"overflow,omitempty"`
}

OutputContent Inline content per claim. Absent, no content is inlined (R-QCONTENT).

type OutputContentOverflow

type OutputContentOverflow string

OutputContentOverflow What becomes of content past the cap: cutoff inlines the bytes up to it, omit inlines whole values only. Absent, omit. A claim keeps every field it carries either way (R-QCONTENT).

const (
	Cutoff OutputContentOverflow = "cutoff"
	Omit   OutputContentOverflow = "omit"
)

Defines values for OutputContentOverflow.

func (OutputContentOverflow) Valid

func (e OutputContentOverflow) Valid() bool

Valid indicates whether the value is a known member of the OutputContentOverflow enum.

type OutputDetail

type OutputDetail string

OutputDetail What each element carries: id (the id alone), claims (a record the engine assembles, shaped by form and content), or envelope (the stored bytes copied out whole, the only output a client can hash against an id; form and content do not apply, and both form: materialized and encoding: json are rejected with it). Under shape: path it applies to every claim in the route (R-QDETAIL, R-QCANON).

const (
	OutputDetailClaims   OutputDetail = "claims"
	OutputDetailEnvelope OutputDetail = "envelope"
	OutputDetailId       OutputDetail = "id"
)

Defines values for OutputDetail.

func (OutputDetail) Valid

func (e OutputDetail) Valid() bool

Valid indicates whether the value is a known member of the OutputDetail enum.

type OutputEncoding

type OutputEncoding string

OutputEncoding json is text with content base64-encoded, cbor is binary; the same information either way (R-QENCODING).

const (
	Cbor OutputEncoding = "cbor"
	Json OutputEncoding = "json"
)

Defines values for OutputEncoding.

func (OutputEncoding) Valid

func (e OutputEncoding) Valid() bool

Valid indicates whether the value is a known member of the OutputEncoding enum.

type OutputForm

type OutputForm string

OutputForm Which field values a claim carries: original as written, a diff-overlaid claim's delta; materialized with any contribution/diff chain resolved over the predecessor it references, recursively to a base claim. A property of the values, hence orthogonal to detail and encoding (R-QFORM).

const (
	Materialized OutputForm = "materialized"
	Original     OutputForm = "original"
)

Defines values for OutputForm.

func (OutputForm) Valid

func (e OutputForm) Valid() bool

Valid indicates whether the value is a known member of the OutputForm enum.

type OutputShape

type OutputShape string

OutputShape single yields the reached endpoints, one element each; path yields routes, each running outward from the frontier claim its walk began at (R-QSHAPE).

const (
	Path   OutputShape = "path"
	Single OutputShape = "single"
)

Defines values for OutputShape.

func (OutputShape) Valid

func (e OutputShape) Valid() bool

Valid indicates whether the value is a known member of the OutputShape enum.

type PathStep

type PathStep struct {
	// Dir provenance follows references outward, uses runs to the claims that cite this one, connections either way. Absent, provenance.
	Dir *PathStepDir `json:"dir,omitempty"`

	// Edges Edge types every hop must match.
	Edges *[]TypeGlob `json:"edges,omitempty"`

	// Max Most hops. 0, or absent, leaves the step unbounded: a step of at most zero hops would move nothing, so that reading has no use.
	Max *int `json:"max,omitempty"`

	// Min Fewest hops. Absent, 1 — a step moves at least one hop. 0 also yields the starting set, carrying the frontier through alongside what lies beyond it.
	Min *int `json:"min,omitempty"`

	// Nodes Node types the step may yield.
	Nodes *[]TypeGlob `json:"nodes,omitempty"`
}

PathStep One section of a path. edges bounds the walk: every hop must follow an edge whose type is listed. nodes bounds the answer: a step yields a claim only when its node's type is listed, whatever the nodes it crossed to reach it. min and max bound the hops. A min above a bounded max is refused by the implementation — a JSON Schema cannot compare two sibling values (R-QSTEPS).

type PathStepDir

type PathStepDir string

PathStepDir provenance follows references outward, uses runs to the claims that cite this one, connections either way. Absent, provenance.

const (
	Connections PathStepDir = "connections"
	Provenance  PathStepDir = "provenance"
	Uses        PathStepDir = "uses"
)

Defines values for PathStepDir.

func (PathStepDir) Valid

func (e PathStepDir) Valid() bool

Valid indicates whether the value is a known member of the PathStepDir enum.

type Query

type Query struct {
	// Execution Where the query runs and how it reports on itself. These controls reach execution and diagnostics, and never the result set.
	Execution *Execution `json:"execution,omitempty"`

	// Limit Bounds the read. A read cut short by either bound is a complete answer to the query as bounded, not an error (R-QLIMIT).
	Limit *Limit `json:"limit,omitempty"`

	// Order Sort keys applied in priority order. Claims lacking a key's field sort last, and the archive's natural (created_at, id) order breaks any remaining ties, so the sort always resolves to a total order (R-QSORT).
	Order *Order `json:"order,omitempty"`

	// Output Shapes each result along orthogonal axes. detail: claims with form: original and encoding: cbor reproduces the canonical serialization S(v) a claim's id is computed over, and is the only output form directly verifiable against that id (R-QCANON).
	Output *Output `json:"output,omitempty"`

	// Select A generator in four independent parts: branch is the scope, head the closure read, claim where the walk starts, path the traversal. Scope and start are independent because a walk runs both ways — a uses step reaches the claims that cite the current one, which lie above it, so the closure decides a reverse step's answer.
	Select Select `json:"select"`

	// Where A boolean tree. Each node is exactly one of the and / or / not combinators over sub-trees, or a leaf naming a field and its test. Within a where, or is boolean; across generators it unions whole result sets. A leaf may name any field a claim carries, height included (V-HEIGHT).
	Where *Where `json:"where,omitempty"`
}

Query A read, evaluated in a fixed logical order: select generates the result set, where filters it, order sorts it, limit truncates it, output shapes and encodes each surviving claim (R-QEVAL).

type QueryJSONRequestBody

type QueryJSONRequestBody = Query

QueryJSONRequestBody defines body for Query for application/json ContentType.

type QueryResponse

type QueryResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON404 the response for an HTTP 404 `application/json` response
	JSON404 *NotFound
}

func ParseQueryResponse

func ParseQueryResponse(rsp *http.Response) (*QueryResponse, error)

ParseQueryResponse parses an HTTP response from a QueryWithResponse call

func (QueryResponse) ContentType

func (r QueryResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (QueryResponse) GetBody

func (r QueryResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (QueryResponse) GetJSON400

func (r QueryResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (QueryResponse) GetJSON401

func (r QueryResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (QueryResponse) GetJSON403

func (r QueryResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (QueryResponse) GetJSON404

func (r QueryResponse) GetJSON404() *NotFound

GetJSON404 returns the response for an HTTP 404 `application/json` response

func (QueryResponse) Status

func (r QueryResponse) Status() string

Status returns HTTPResponse.Status

func (QueryResponse) StatusCode

func (r QueryResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type RequestEditorFn

type RequestEditorFn func(ctx context.Context, req *http.Request) error

RequestEditorFn is the function signature for the RequestEditor callback function

type Select

type Select struct {
	// Branch The mandatory scope, and every scope names a graph: a branch name confines to that branch, $archive to the whole Ranke-Archive, $universe applies no confinement and is privileged. An empty value is refused (R-QSCOPE).
	Branch string `json:"branch"`

	// Claim Anchors the frontier at the claims it names, one id or a set of them, each of which must lie inside the closure. A set names its members in no order and holds each once. Absent, the frontier is every claim in the closure and the path is unanchored (R-QANCHOR). A set anchor with an empty path resolves the height of the claims a new claim references (V-HEIGHT) in one read.
	Claim *Select_Claim `json:"claim,omitempty"`

	// Head A claim id: id(v) = Sign(H(S(v))) for a node, id(e) = H(S(e)) for an edge, carried as multibase base32 of the self-describing payload. The pattern fixes the multibase framing; whether the payload's multihash or multikey framing parses is the implementation's check.
	Head *Id `json:"head,omitempty"`

	// Path The traversal: a sequence of steps over frontiers, each frontier a set of claims. Each step's yield is the frontier the next starts from, and the no-repeat rule holds within a step and resets at each boundary, so membership is all a frontier carries (R-QFRONTIER). Empty, the generator takes no step and returns the frontier itself; absent, it returns the frontier's full outward closure (R-QSTEPS).
	Path *[]PathStep `json:"path,omitempty"`
}

Select A generator in four independent parts: branch is the scope, head the closure read, claim where the walk starts, path the traversal. Scope and start are independent because a walk runs both ways — a uses step reaches the claims that cite the current one, which lie above it, so the closure decides a reverse step's answer.

type SelectClaim1 added in v1.28.0

type SelectClaim1 = []Id

SelectClaim1 defines model for Select.Claim.1.

type Select_Claim added in v1.28.0

type Select_Claim struct {
	// contains filtered or unexported fields
}

Select_Claim Anchors the frontier at the claims it names, one id or a set of them, each of which must lie inside the closure. A set names its members in no order and holds each once. Absent, the frontier is every claim in the closure and the path is unanchored (R-QANCHOR). A set anchor with an empty path resolves the height of the claims a new claim references (V-HEIGHT) in one read.

func (Select_Claim) AsId added in v1.28.0

func (t Select_Claim) AsId() (Id, error)

AsId returns the union data inside the Select_Claim as a Id

func (Select_Claim) AsSelectClaim1 added in v1.28.0

func (t Select_Claim) AsSelectClaim1() (SelectClaim1, error)

AsSelectClaim1 returns the union data inside the Select_Claim as a SelectClaim1

func (*Select_Claim) FromId added in v1.28.0

func (t *Select_Claim) FromId(v Id) error

FromId overwrites any union data inside the Select_Claim as the provided Id

func (*Select_Claim) FromSelectClaim1 added in v1.28.0

func (t *Select_Claim) FromSelectClaim1(v SelectClaim1) error

FromSelectClaim1 overwrites any union data inside the Select_Claim as the provided SelectClaim1

func (Select_Claim) MarshalJSON added in v1.28.0

func (t Select_Claim) MarshalJSON() ([]byte, error)

func (*Select_Claim) MergeId added in v1.28.0

func (t *Select_Claim) MergeId(v Id) error

MergeId performs a merge with any union data inside the Select_Claim, using the provided Id

func (*Select_Claim) MergeSelectClaim1 added in v1.28.0

func (t *Select_Claim) MergeSelectClaim1(v SelectClaim1) error

MergeSelectClaim1 performs a merge with any union data inside the Select_Claim, using the provided SelectClaim1

func (*Select_Claim) UnmarshalJSON added in v1.28.0

func (t *Select_Claim) UnmarshalJSON(b []byte) error

type StartVerificationJSONRequestBody

type StartVerificationJSONRequestBody = VerificationConfig

StartVerificationJSONRequestBody defines body for StartVerification for application/json ContentType.

type StartVerificationResponse

type StartVerificationResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON202 the response for an HTTP 202 `application/json` response
	JSON202 *VerificationReport
	// JSON400 the response for an HTTP 400 `application/json` response
	JSON400 *BadRequest
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Unauthorized
	// JSON403 the response for an HTTP 403 `application/json` response
	JSON403 *Forbidden
	// JSON429 the response for an HTTP 429 `application/json` response
	JSON429 *Error
	// Headers202 the parsed response headers for an HTTP 202 response
	Headers202 *StartVerificationResponse202Headers
	// Headers429 the parsed response headers for an HTTP 429 response
	Headers429 *StartVerificationResponse429Headers
}

func ParseStartVerificationResponse

func ParseStartVerificationResponse(rsp *http.Response) (*StartVerificationResponse, error)

ParseStartVerificationResponse parses an HTTP response from a StartVerificationWithResponse call

func (StartVerificationResponse) ContentType

func (r StartVerificationResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (StartVerificationResponse) GetBody

func (r StartVerificationResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (StartVerificationResponse) GetJSON202

GetJSON202 returns the response for an HTTP 202 `application/json` response

func (StartVerificationResponse) GetJSON400

func (r StartVerificationResponse) GetJSON400() *BadRequest

GetJSON400 returns the response for an HTTP 400 `application/json` response

func (StartVerificationResponse) GetJSON401

func (r StartVerificationResponse) GetJSON401() *Unauthorized

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (StartVerificationResponse) GetJSON403

func (r StartVerificationResponse) GetJSON403() *Forbidden

GetJSON403 returns the response for an HTTP 403 `application/json` response

func (StartVerificationResponse) GetJSON429

func (r StartVerificationResponse) GetJSON429() *Error

GetJSON429 returns the response for an HTTP 429 `application/json` response

func (StartVerificationResponse) Status

func (r StartVerificationResponse) Status() string

Status returns HTTPResponse.Status

func (StartVerificationResponse) StatusCode

func (r StartVerificationResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

type StartVerificationResponse202Headers

type StartVerificationResponse202Headers struct {
	Location   *string
	RetryAfter *int
}

StartVerificationResponse202Headers the declared response headers of an HTTP 202 response for StartVerification

type StartVerificationResponse429Headers

type StartVerificationResponse429Headers struct {
	RetryAfter *int
}

StartVerificationResponse429Headers the declared response headers of an HTTP 429 response for StartVerification

type StorageLayer

type StorageLayer struct {
	Name string `json:"name"`

	// Type Adapter type (e.g. memory, filesystem, s3, redis, neo4j).
	Type string `json:"type"`
}

StorageLayer defines model for StorageLayer.

type StorageLayerList

type StorageLayerList struct {
	// Layers Read-through tiers, top (cache) to bottom (authoritative).
	Layers []StorageLayer `json:"layers"`
}

StorageLayerList defines model for StorageLayerList.

type Subject

type Subject struct {
	// Account The account the credential resolved to.
	//
	// Example: webapp
	Account string `json:"account"`

	// Caveats Attenuations carried by this credential, narrowing the grants above.
	// Every caveat must allow a request for it to pass. Empty where the
	// credential carries none.
	//
	//
	// Example: ["R foo_bar"]
	Caveats []string `json:"caveats"`

	// Grants The account's grants, each a `RIGHTS glob` spec as the configuration
	// states it. An account holding none reports an empty array.
	//
	//
	// Example: ["CR foo_*","R $archive"]
	Grants []string `json:"grants"`
}

Subject defines model for Subject.

type TypeGlob

type TypeGlob = string

TypeGlob A glob over class/sub, e.g. derivation/* or entity/person. A leading - excludes. Exclusion decides: a type matching an excluded pattern is refused whatever the included patterns say, and a list of exclusions alone admits every other type (R-QSTEPS).

type Unauthorized

type Unauthorized = Error

Unauthorized defines model for Unauthorized.

type Value

type Value = interface{}

Value A value a comparison tests against. On a field V-TIME or V-DATED governs it MUST take that field's own form — a V-TIME timestamp on a V-TIME field, an EDTF Level 1 value on a V-DATED field — and anything else, a glob included, is rejected rather than coerced (R-QTIMEOP); an interval is a pair of bounds. The form binds the value as encoded here, so a binding may take its own language's temporal type provided it renders it into that form. Otherwise how two values compare is the engine's.

type VerificationConfig

type VerificationConfig struct {
	// Closure Root of the closure to verify — a branch name or a claim id.
	Closure string `json:"closure"`

	// ContentThreshold For full-content, the max content size in bytes to re-read and re-hash
	// per claim; larger content is skipped this run. Omit to verify all content.
	ContentThreshold *int `json:"contentThreshold,omitempty"`

	// Depth completeness (a `has` sweep), record-correctness (recanonicalise and
	// recheck the id-chain and signatures), or full-content (also re-hash blobs).
	Depth *VerificationConfigDepth `json:"depth,omitempty"`

	// Layer Storage layer (by name) to read directly. Omit to read the composed
	// read-through view — which may mask the loss of an object on a deeper
	// layer, so name a layer to verify it without blind spots.
	Layer *string `json:"layer,omitempty"`
}

VerificationConfig Parameters for a verification run — the same shape whether declared in the stack config (scheduled) or posted ad-hoc. Depths are those of core-verification.

type VerificationConfigDepth

type VerificationConfigDepth string

VerificationConfigDepth completeness (a `has` sweep), record-correctness (recanonicalise and recheck the id-chain and signatures), or full-content (also re-hash blobs).

const (
	Completeness      VerificationConfigDepth = "completeness"
	FullContent       VerificationConfigDepth = "full-content"
	RecordCorrectness VerificationConfigDepth = "record-correctness"
)

Defines values for VerificationConfigDepth.

func (VerificationConfigDepth) Valid

func (e VerificationConfigDepth) Valid() bool

Valid indicates whether the value is a known member of the VerificationConfigDepth enum.

type VerificationFailure

type VerificationFailure struct {
	Detail *string `json:"detail,omitempty"`

	// Id The claim or object id that failed.
	Id string `json:"id"`

	// Layer The layer where the failure was observed.
	Layer string `json:"layer"`

	// Mode corrupt-bytes — stored bytes don't match their hash (storage rot/loss;
	// self-heals via read-through if a deeper layer is intact).
	// invalid-content — the claim itself doesn't validate (e.g. bad signature);
	// unrepairable.
	Mode VerificationFailureMode `json:"mode"`
}

VerificationFailure defines model for VerificationFailure.

type VerificationFailureMode

type VerificationFailureMode string

VerificationFailureMode corrupt-bytes — stored bytes don't match their hash (storage rot/loss; self-heals via read-through if a deeper layer is intact). invalid-content — the claim itself doesn't validate (e.g. bad signature); unrepairable.

const (
	CorruptBytes   VerificationFailureMode = "corrupt-bytes"
	InvalidContent VerificationFailureMode = "invalid-content"
)

Defines values for VerificationFailureMode.

func (VerificationFailureMode) Valid

func (e VerificationFailureMode) Valid() bool

Valid indicates whether the value is a known member of the VerificationFailureMode enum.

type VerificationReport

type VerificationReport struct {
	// BytesRead Content bytes re-read so far; advances while `status` is `running`.
	BytesRead *int `json:"bytesRead,omitempty"`

	// ClaimsChecked Claims checked so far; advances while `status` is `running`.
	ClaimsChecked *int       `json:"claimsChecked,omitempty"`
	CompletedAt   *time.Time `json:"completedAt,omitempty"`

	// Config Parameters for a verification run — the same shape whether declared in the
	// stack config (scheduled) or posted ad-hoc. Depths are those of
	// core-verification.
	Config VerificationConfig `json:"config"`

	// Failures The failures found, accumulating while `status` is `running`. Empty (with
	// `ok: true`) for an intact closure; a healthy archive verifies with none.
	Failures *[]VerificationFailure `json:"failures,omitempty"`

	// Head The head id the run verified — the closure it pinned at start. When
	// `config.closure` names a branch, this is the branch's head at start time;
	// the report stays fixed to it even as the branch head moves on.
	Head string `json:"head"`
	Id   string `json:"id"`

	// Ok True when no failures were found in this run.
	Ok        bool      `json:"ok"`
	StartedAt time.Time `json:"startedAt"`

	// Status running (in progress), complete (finished on its own), stopped (cancelled
	// by an operator via the cancel action — partial findings kept), or error
	// (the run itself failed).
	Status VerificationReportStatus `json:"status"`
}

VerificationReport A point-in-time record of a verification run; embeds the config that produced it.

type VerificationReportList

type VerificationReportList struct {
	Reports []VerificationReport `json:"reports"`
}

VerificationReportList defines model for VerificationReportList.

type VerificationReportStatus

type VerificationReportStatus string

VerificationReportStatus running (in progress), complete (finished on its own), stopped (cancelled by an operator via the cancel action — partial findings kept), or error (the run itself failed).

const (
	VerificationReportStatusComplete VerificationReportStatus = "complete"
	VerificationReportStatusError    VerificationReportStatus = "error"
	VerificationReportStatusRunning  VerificationReportStatus = "running"
	VerificationReportStatusStopped  VerificationReportStatus = "stopped"
)

Defines values for VerificationReportStatus.

func (VerificationReportStatus) Valid

func (e VerificationReportStatus) Valid() bool

Valid indicates whether the value is a known member of the VerificationReportStatus enum.

type Where

type Where struct {
	// contains filtered or unexported fields
}

Where A boolean tree. Each node is exactly one of the and / or / not combinators over sub-trees, or a leaf naming a field and its test. Within a where, or is boolean; across generators it unions whole result sets. A leaf may name any field a claim carries, height included (V-HEIGHT).

func (Where) AsWhere0

func (t Where) AsWhere0() (Where0, error)

AsWhere0 returns the union data inside the Where as a Where0

func (Where) AsWhere1

func (t Where) AsWhere1() (Where1, error)

AsWhere1 returns the union data inside the Where as a Where1

func (Where) AsWhere2

func (t Where) AsWhere2() (Where2, error)

AsWhere2 returns the union data inside the Where as a Where2

func (Where) AsWhere3

func (t Where) AsWhere3() (Where3, error)

AsWhere3 returns the union data inside the Where as a Where3

func (*Where) FromWhere0

func (t *Where) FromWhere0(v Where0) error

FromWhere0 overwrites any union data inside the Where as the provided Where0

func (*Where) FromWhere1

func (t *Where) FromWhere1(v Where1) error

FromWhere1 overwrites any union data inside the Where as the provided Where1

func (*Where) FromWhere2

func (t *Where) FromWhere2(v Where2) error

FromWhere2 overwrites any union data inside the Where as the provided Where2

func (*Where) FromWhere3

func (t *Where) FromWhere3(v Where3) error

FromWhere3 overwrites any union data inside the Where as the provided Where3

func (Where) MarshalJSON

func (t Where) MarshalJSON() ([]byte, error)

func (*Where) MergeWhere0

func (t *Where) MergeWhere0(v Where0) error

MergeWhere0 performs a merge with any union data inside the Where, using the provided Where0

func (*Where) MergeWhere1

func (t *Where) MergeWhere1(v Where1) error

MergeWhere1 performs a merge with any union data inside the Where, using the provided Where1

func (*Where) MergeWhere2

func (t *Where) MergeWhere2(v Where2) error

MergeWhere2 performs a merge with any union data inside the Where, using the provided Where2

func (*Where) MergeWhere3

func (t *Where) MergeWhere3(v Where3) error

MergeWhere3 performs a merge with any union data inside the Where, using the provided Where3

func (*Where) UnmarshalJSON

func (t *Where) UnmarshalJSON(b []byte) error

type Where0

type Where0 struct {
	And []Where `json:"and"`
}

Where0 defines model for Where.0.

type Where1

type Where1 struct {
	Or []Where `json:"or"`
}

Where1 defines model for Where.1.

type Where2

type Where2 struct {
	// Not A boolean tree. Each node is exactly one of the and / or / not combinators over sub-trees, or a leaf naming a field and its test. Within a where, or is boolean; across generators it unions whole result sets. A leaf may name any field a claim carries, height included (V-HEIGHT).
	Not Where `json:"not"`
}

Where2 defines model for Where.2.

type Where3

type Where3 struct {
	// Field The field tested — any field a claim carries, height included.
	Field string `json:"field"`

	// Test One operator applied to one field. eq, ne, lt, le, gt and ge take a value, in a set, glob a shell-style wildcard. Exactly one is present.
	Test Comparison `json:"test"`
}

Where3 A leaf: one field, one comparison.

type WhoamiResponse

type WhoamiResponse struct {
	Body         []byte
	HTTPResponse *http.Response
	// JSON200 the response for an HTTP 200 `application/json` response
	JSON200 *Subject
	// JSON401 the response for an HTTP 401 `application/json` response
	JSON401 *Error
}

func ParseWhoamiResponse

func ParseWhoamiResponse(rsp *http.Response) (*WhoamiResponse, error)

ParseWhoamiResponse parses an HTTP response from a WhoamiWithResponse call

func (WhoamiResponse) ContentType

func (r WhoamiResponse) ContentType() string

ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers

func (WhoamiResponse) GetBody

func (r WhoamiResponse) GetBody() []byte

GetBody returns the raw response body bytes

func (WhoamiResponse) GetJSON200

func (r WhoamiResponse) GetJSON200() *Subject

GetJSON200 returns the response for an HTTP 200 `application/json` response

func (WhoamiResponse) GetJSON401

func (r WhoamiResponse) GetJSON401() *Error

GetJSON401 returns the response for an HTTP 401 `application/json` response

func (WhoamiResponse) Status

func (r WhoamiResponse) Status() string

Status returns HTTPResponse.Status

func (WhoamiResponse) StatusCode

func (r WhoamiResponse) StatusCode() int

StatusCode returns HTTPResponse.StatusCode

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL