dashboard

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package dashboard is the server-rendered web UI (AC-4.9 third surface). It renders a search form and result table from the SAME SearchService the CLI and REST API use — GQL semantics, pagination, and freshness notices are identical across all three surfaces.

The dashboard is read-only: it never triggers scanning (ADR-0010) and imports only internal/search (AC-3.1 import-graph test).

Package dashboard implements the server-rendered pages (v0.0.1: /, /search, /assets/{id}, /about) calling the same SearchService server-side (AC-4.9 third surface).

M1: package skeleton only (this doc.go). M10 lands the pages and the three-surface parity (CLI -o json vs REST vs Dashboard server-side call return identical row identity sets + total across F1–F17).

The dashboard package depends on internal/search and internal/config; it never imports any collector or egress package (ADR-0010; AC-3.1).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dashboard

type Dashboard struct {
	// contains filtered or unexported fields
}

Dashboard serves the web UI over the shared SearchService.

func New

func New(svc *search.Service) *Dashboard

New builds the Dashboard.

func (*Dashboard) Handler

func (d *Dashboard) Handler() http.Handler

Handler returns the dashboard's http.Handler (mounted at "/" by the server command). Hardening (M16 security review):

  • security response headers on every response (nosniff, DENY framing, no-referrer, a scriptless CSP);
  • GET-only serving: the dashboard has no state-changing endpoint and no cookies, so there is no CSRF surface by construction — the method guard pins that invariant instead of trusting future code to keep it (405 for anything but GET/HEAD).

Jump to

Keyboard shortcuts

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