web

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package web embeds the Jōei admin console (浄衛 — The Purification Gate) and serves it as static assets. The console is a self-contained React single-page app: its JSX sources are compiled to a single minified app.bundle.js at build time (see internal/uibuild, run via `go generate`), and React/ReactDOM are vendored locally. No CDN and no in-browser compilation, so the console works offline. The built assets are baked into the binary via go:embed so it ships inside the distroless image with no extra files at runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsoleHandler

func ConsoleHandler() http.Handler

ConsoleHandler returns an http.Handler that serves the embedded console. Mount it under the "/console/" path prefix; requests are stripped of the "/console" prefix before hitting the embedded file server, so "/console/" serves index.html and "/console/styles.css" serves the stylesheet.

func FaviconHandler

func FaviconHandler() http.Handler

FaviconHandler returns an http.Handler that serves /favicon.ico from the embedded console assets. Mount it at the exact root path "/favicon.ico" so browser auto-probes get a real icon instead of a 404 — no auth, since the icon is public. The file is read once at construction.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL