Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIResponse ¶
type APIResponse struct {
Success bool `json:"success"`
Data any `json:"data,omitempty"`
Error string `json:"error,omitempty"`
// ErrorClass is populated on every redacted response and only there (#301) —
// the stable machine token clients discriminate on. ErrorID, a correlation
// id echoed on the operator log line that holds the error chain, appears on
// every redacted response and, since #361, on a disclosed 4xx that withholds
// operator detail (forma.HasOperatorDetail), where it matches the Warnw line
// keeping the only copy of that detail. Since #313 a redacted response can
// be a 4xx as well as a 5xx: an error that carries a client sentinel but
// publishes no message (a bare sentinel wrap, or a carrier-less mixed chain)
// keeps its status and loses its body. Both fields are omitempty, so success
// bodies and detail-less published 4xx bodies are unchanged.
ErrorClass string `json:"error_class,omitempty"`
ErrorID string `json:"error_id,omitempty"`
// SchemaID names the schema a redacted read failure was addressed to (#301,
// reinstated by the issue owner after the design excluded it — see
// errorSchemaID and docs/error-handling.md). omitempty is a lossless "absent"
// encoding because schema IDs are always positive here, the same invariant
// that makes a manifest schema_id of zero mean unstamped rather than schema 0.
SchemaID int16 `json:"schema_id,omitempty"`
}
APIResponse is the standard response format.
type Manager ¶
type Manager interface {
forma.EntityWriter
forma.EntityReader
forma.EntityBatchOperator
}
Click to show internal directories.
Click to hide internal directories.