Documentation
¶
Overview ¶
Package web provides embedded static resources for the Inspector Web UI.
The web package uses Go's embed directive to bundle the compiled frontend assets directly into the binary, enabling zero-dependency deployment.
Usage ¶
// Serve embedded static files
http.Handle("/", web.Handler())
// Or get the filesystem directly
fs := web.FS()
Package web provides embedded static resources for the Inspector Web UI.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandlerWithPrefix ¶
HandlerWithPrefix returns an http.Handler that serves the embedded web UI with the given URL prefix stripped.
func NewServer ¶
func NewServer(config ServerConfig) http.Handler
NewServer creates a new HTTP handler that serves both the web UI and API.
Types ¶
type ServerConfig ¶
type ServerConfig struct {
// APIHandler handles /api/* routes.
APIHandler http.Handler
// FallbackToIndex enables SPA routing (returns index.html for unknown routes).
FallbackToIndex bool
}
ServerConfig holds configuration for the web server.
Click to show internal directories.
Click to hide internal directories.