httpapi

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 11 Imported by: 0 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

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 Options

type Options struct {
	EnableHealth bool
}

type Server

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

func NewServer

func NewServer(manager Manager, opts Options) *Server

func (*Server) Handler

func (s *Server) Handler() http.Handler

Jump to

Keyboard shortcuts

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