Documentation
¶
Overview ¶
Package webui hosts an HTTP server serving a JSON API and embedded web UI for a single TASKS.md/csv file. It is started by the `md webui` subcommand and consumed both by browsers and by the meads VS Code extension.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoBindClient = errors.New("no VS Code client bound")
ErrNoBindClient is returned when a vscode.* RPC call is attempted but no VS Code client is currently connected to /bind-vscode.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Store *meads.Store
// Host to bind, e.g. "127.0.0.1". Defaults to 127.0.0.1.
Host string
// Port to listen on. 0 = pick a random free port.
Port int
// Token required on every request (bearer or ?token=). Auto-generated if empty.
Token string
// Stdout format on start: "url", "json", or "none".
Print string
// Open browser after start (ignored when Print=none).
Open bool
// Dev mode: serve assets from disk rather than embed. Enabled via WEBUI_DEV=1.
Dev bool
// Stdout target for the start line. Defaults to os.Stdout.
Stdout io.Writer
// Stderr target for log messages. Defaults to os.Stderr.
Stderr io.Writer
}
Config controls a Server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an HTTP server exposing the webui API.
func (*Server) Addr ¶
Addr returns the final listen address. Only valid after Run returns a non-blocking URL.
func (*Server) Run ¶
Run binds the listener, prints the start line, and blocks until ctx is canceled.
Click to show internal directories.
Click to hide internal directories.