1.4 KiB
1.4 KiB
API Surface
Primary Integration Style
The package is intended to be embedded by other Go applications.
Current package shape:
viewer.RenderHTML(snapshot []byte) ([]byte, error)viewer.NewHandler(viewer.HandlerOptions{...}) http.Handlerviewer.NewStandaloneHandler(viewer.HandlerOptions{...}) http.Handler
Integration model:
- embedding app provides the JSON
- chart renders HTML
- embedded mode does not own snapshot selection UI
- standalone mode may provide a local upload screen on
GET /
Expected Runtime Endpoints
These endpoints are expected for the standalone binary only:
GET /- upload pagePOST /render- accept one Reanimator JSON payload and return rendered HTMLGET /healthz- basic process health
Embedded handler endpoints:
GET /- empty viewer shell with no upload controlsPOST /render- accept one Reanimator JSON payload and return rendered HTMLGET /healthz- basic process healthGET /static/...- embedded static assets
UI Route Rules
- No multi-product navigation
- No upload wizard with preview/confirm/execute stages
- No collector/API-connect workflow
- No background job polling API
- Embedded mode must not force a file picker into host applications
Response Rules
- HTML pages are read-only views of one snapshot
- API responses must not modify or augment the input payload semantics