report

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package report serves the daily-briefing HTML under System/reports/ inside a sandboxed iframe. A requested name matches a briefing the snapshot already enumerated or it matches nothing; the raw endpoint writes the file's bytes unchanged under a sandbox policy set on the resource itself, so containment does not depend on the embedder.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler serves the reports face through one process-owned vault Reader.

func New

func New(source *vaultfs.Reader, snapshotProvider func() RequestSnapshot, log *slog.Logger) *Handler

New wires the reports feature. Every dependency must be non-nil: a nil is a wiring bug that must fail here, not on the first request.

func (*Handler) Register

func (h *Handler) Register(mux *http.ServeMux)

Register mounts the report index, the report shell page, and the raw endpoint its iframe points at.

type RequestSnapshot added in v0.2.0

type RequestSnapshot struct {
	Generation *snapshot.Generation
	Shell      nav.Shell
}

RequestSnapshot is the reading generation and the shell state captured together from one atomic vault generation. Two separate captures could name a report the rail beside it has never heard of.

Jump to

Keyboard shortcuts

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