Documentation ¶
Overview ¶
Package cmdweb implements the "web" subcommand.
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type UI ¶
type UI struct { // Store returns the active instance of the store to serve. Store func() *kfdb.Store // Static is the filesystem containing static file assets. Static fs.FS // Templates are the compiled UI templates. Templates *template.Template // LockPIN, if non-empty, is the PIN used to unlock a locked UI. LockPIN string // Locked, if true, is whether the UI is (currently) locked. Locked bool // LockTimeout is the duration after unlocking the UI before it will be // automatically locked. If zero, the UI will not auto-lock. LockTimeout time.Duration // Expert, if true, enables expert settings. Expert bool // contains filtered or unexported fields }
UI implements the HTTP endpoints for the Keyfish web UI.
func (*UI) ServeMux ¶
ServeMux returns a router for the UI endpoints:
GET /static/ -- serve static assets GET / -- serve the main UI page GET /search -- serve search results (partial) GET /view -- serve a single record view (partial) GET /detail -- serve a single record detail (partial) GET /password -- serve a single record password (partial) GET /totp -- serve a single record TOTP code (partial) GET /unlock -- request an unlock of the UI
Click to show internal directories.
Click to hide internal directories.