Documentation
¶
Overview ¶
Package web hosts the non-SPA HTTP surface: the SPA shell, the API docs shell, JSON auth endpoints (login / register / logout / config), and the OIDC redirect dance. Page rendering is owned entirely by the Svelte SPA; this package is intentionally small.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Deps ¶
type Deps struct {
Auth auth.Manager
OIDC auth.OIDCManager
Limiter auth.Limiter
MediaServers mediaserver.Manager
}
Deps is the dependency set required by the web Handler.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler exposes the non-SPA webui routes. Constructed in the composition root with the auth service-layer deps.
func (*Handler) APIDocs ¶
func (h *Handler) APIDocs(w http.ResponseWriter, r *http.Request)
APIDocs serves the embedded Scalar shell at /api/docs. The bundled docs JS + CSS live under /static/.
func (*Handler) SPAShell ¶
func (h *Handler) SPAShell(w http.ResponseWriter, r *http.Request)
SPAShell serves the embedded Svelte single-page app entry HTML. Every non-API, non-static path returns the same shell; Routify takes over routing client-side from there. The shell loads the bundled JS + CSS from /static/dist/.