Documentation
¶
Overview ¶
Package dashboard serves Doorbell's web interface: a landing page for people arriving cold, a live request inspector, and the shared stylesheet and script both are built from.
The HTML lives beside this file rather than in a top-level web/ directory because go:embed cannot reach outside its own package directory — a parent path like ../../web is rejected at compile time, not runtime.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var HTML []byte
HTML is the live request inspector, served at /dashboard.
var Landing []byte
Landing is the public front door: the pitch, live counts, and how to connect. Someone opening the gateway URL cold lands here, not on an unexplained table of HTTP requests.
var Locked []byte
Locked is shown instead of the dashboard when no valid operator token is presented. It explains how to authenticate rather than returning a bare 401, because the person hitting it is nearly always the operator who forgot.
Functions ¶
func AssetHandler ¶
AssetHandler serves /assets/* from the embedded filesystem.
It answers conditional requests with 304 so a dashboard left open all weekend re-fetches the stylesheet only when it has actually changed.
Types ¶
This section is empty.