Documentation
¶
Overview ¶
Package tui provides an offline terminal UI for browsing local corpus data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct {
Repositories []Item `json:"repositories"`
Threads []Item `json:"threads"`
Clusters []Item `json:"clusters"`
Investigations []Item `json:"investigations"`
Opportunities []Item `json:"opportunities"`
}
Data is the offline dataset loaded by the reader.
type Facet ¶
type Facet struct {
Name string `json:"name"`
Present bool `json:"present"`
Complete bool `json:"complete"`
AsOf string `json:"as_of,omitempty"`
}
Facet describes coverage for one data facet.
type Item ¶
type Item struct {
Kind string `json:"kind"`
ID string `json:"id"`
Ref string `json:"ref"`
Title string `json:"title"`
Subtitle string `json:"subtitle,omitempty"`
Detail string `json:"detail,omitempty"`
Source string `json:"source,omitempty"`
AsOf string `json:"as_of,omitempty"`
Coverage []Facet `json:"coverage,omitempty"`
}
Item is one browsable record.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the TUI state.
func Run ¶
Run starts the TUI program with the provided local reader and I/O.
It is suitable for later CLI wiring: the caller supplies a context, a Reader, and input/output streams. The TUI loads local data on start and never performs network I/O on its own.
type Option ¶
type Option func(*Model)
Option customizes a Model.
func WithActionHandler ¶
WithActionHandler registers an optional handler for explicit side-effecting actions such as refresh/hydration. The TUI never invokes it on initial load or search.
type Reader ¶
Reader is a narrow local data source for the TUI. Implementations must not perform network I/O.