Documentation
¶
Overview ¶
Package webui serves the embedded Hanzo Cloud console — the single-page app, white-labelled per request Host.
It is a LEAF: stdlib + the brand registry + zip's net/http bridge, and NOTHING of package cloud. That is the whole reason it exists as its own package. The console has to be served from TWO places — every per-app plugin mounts it as its "/" catch-all through cloud.Serve, and the light host (cmd/cloud) owns "/" at the front door and cannot import package cloud (that would relink the fleet it was split to avoid). One console implementation, reachable from both.
`all:` embeds the whole tree (dotfiles included). At a plain `go build` this is the committed fallback shell (dist/index.html); the build pipeline runs hanzoai/console's `npm run build:embed` (a static export) and OVERWRITES webui/dist with the real @hanzo/gui static bundle BEFORE `go build`, so the shipped binary carries the full console. That pipeline is the Dockerfile console stage for the image, and the `make webui` target for a standalone build. Either way there is exactly one artifact — no separate console Service, no second origin. See webui/dist/index.html, the Makefile, and the Dockerfile console-build stage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
Handler is the console as a stdlib http.Handler (correct Content-Type, conditional GET, precompressed negotiation, SPA fallback) — the form Mount adapts onto the zip router via zip.AdaptNetHTTP, and the form a test drives directly.
func Mount ¶
Mount registers the embedded console at the web root as the app's terminal handler. Its caller registers it LAST — after every /v1 subsystem route, the /zap plane, and the health contract — so the router's in-order matching gives all real API routes precedence and only unmatched paths reach the SPA. Both cloud.Serve (every plugin) and cmd/cloud (the host front door) call it, so the "/" catch-all is spelled ONE way.
Types ¶
This section is empty.