Documentation
¶
Overview ¶
Package api implements the public HTTP API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProofAnchor ¶
type ProofDTO ¶
type ProofDTO struct {
Version int `json:"version"`
SourceID string `json:"source_id"`
SnapshotID int64 `json:"snapshot_id"`
SnapshotCollectedAt time.Time `json:"snapshot_collected_at"`
Event ProofEvent `json:"event"`
Merkle ProofMerkle `json:"merkle"`
Anchors []ProofAnchor `json:"anchors"`
GeneratedAt time.Time `json:"generated_at"`
}
ProofDTO is the exported JSON format the verify CLI consumes.
type ProofEvent ¶
type ProofEvent struct {
ExternalID string `json:"external_id"`
ContentHash string `json:"content_hash"`
CanonicalJSON json.RawMessage `json:"canonical_json"`
}
type ProofMerkle ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the HTTP API server.
func (*Server) Routes ¶
Routes returns an http.Handler with all endpoints wired.
Layout:
- /api/* — JSON HTTP API (collectors, snapshots, events, proofs, diffs)
- /api/metrics — Prometheus metrics
- /api/health — liveness probe
- /* — Embedded React SPA (built from web/ via `make web`) with client-side routing fallback to index.html
Click to show internal directories.
Click to hide internal directories.