Documentation
¶
Index ¶
- Variables
- func Run(stdin io.Reader, stderr io.Writer, model Model) error
- type DiffModel
- func (s DiffModel) ActiveTabID() string
- func (s DiffModel) AppendSearch(value string)
- func (s DiffModel) BackspaceSearch()
- func (s DiffModel) BeginSearch()
- func (s DiffModel) BlurDetails()
- func (s DiffModel) CancelSearch()
- func (m *DiffModel) CollapseAll()
- func (m *DiffModel) CollapseSelected()
- func (s DiffModel) ConfirmSearch()
- func (m *DiffModel) CycleEcosystemFilter()
- func (m *DiffModel) CycleGroup()
- func (m *DiffModel) CycleRelationshipFilter()
- func (m *DiffModel) CycleScopeFilter()
- func (m *DiffModel) CycleSeverityFilter()
- func (s DiffModel) CycleView()
- func (s DiffModel) End()
- func (m *DiffModel) ExpandAll()
- func (m *DiffModel) ExpandSelected()
- func (s DiffModel) FocusDetails()
- func (s DiffModel) Home()
- func (s DiffModel) IsDetailsFocused() bool
- func (s DiffModel) IsSearching() bool
- func (s DiffModel) List() *listModel
- func (s DiffModel) Move(delta int)
- func (s DiffModel) Rebuild()
- func (s DiffModel) ScrollDetails(delta int)
- func (s DiffModel) SelectView(index int)
- func (s DiffModel) TabLine() string
- func (m *DiffModel) ToggleSelected()
- func (m *DiffModel) View(width, height int) string
- func (m *DiffModel) WithEnrichEnabled(enabled bool) *DiffModel
- func (m *DiffModel) WithRegistry(base, head *sdk.PackageRegistry) *DiffModel
- type Model
- type ScanModel
- func (s ScanModel) ActiveTabID() string
- func (s ScanModel) AppendSearch(value string)
- func (s ScanModel) BackspaceSearch()
- func (s ScanModel) BeginSearch()
- func (s ScanModel) BlurDetails()
- func (m *ScanModel) CanGoBack() bool
- func (s ScanModel) CancelSearch()
- func (m *ScanModel) CollapseAll()
- func (m *ScanModel) CollapseSelected()
- func (s ScanModel) ConfirmSearch()
- func (m *ScanModel) CycleEcosystemFilter()
- func (m *ScanModel) CycleGroup()
- func (m *ScanModel) CycleReachabilityFilter()
- func (m *ScanModel) CycleRelationshipFilter()
- func (m *ScanModel) CycleScopeFilter()
- func (m *ScanModel) CycleSeverityFilter()
- func (s ScanModel) CycleView()
- func (s ScanModel) End()
- func (m *ScanModel) ExpandAll()
- func (m *ScanModel) ExpandSelected()
- func (s ScanModel) FocusDetails()
- func (m *ScanModel) GoBack()
- func (s ScanModel) Home()
- func (s ScanModel) IsDetailsFocused() bool
- func (s ScanModel) IsSearching() bool
- func (s ScanModel) List() *listModel
- func (s ScanModel) Move(delta int)
- func (m *ScanModel) OpenSelected()
- func (s ScanModel) Rebuild()
- func (s ScanModel) ScrollDetails(delta int)
- func (s ScanModel) SelectView(index int)
- func (s ScanModel) TabLine() string
- func (m *ScanModel) ToggleSelected()
- func (m *ScanModel) View(width, height int) string
- func (m *ScanModel) WithEnrichEnabled(enabled bool) *ScanModel
- func (m *ScanModel) WithReachabilityEnabled(enabled bool) *ScanModel
- func (m *ScanModel) WithRegistry(registry *sdk.PackageRegistry) *ScanModel
- type ShellSpec
- type TabBuild
- type TabSpec
Constants ¶
This section is empty.
Variables ¶
var ErrNotATerminal = errors.New("--interactive requires a terminal stdin and stderr")
ErrNotATerminal is returned by Run when stdin or stderr is not an attached terminal. Callers (the CLI) typically translate this into an invalid-input exit code.
Functions ¶
Types ¶
type DiffModel ¶
type DiffModel struct {
// contains filtered or unexported fields
}
DiffModel renders the interactive `bomly diff` TUI. Tab cycling, the tab strip, and the top bar are owned by the embedded *shellModel; this struct holds diff payload data and per-tab state (filters, expansion maps).
func NewDiff ¶
func NewDiff(payload output.DiffResponse, baseGraph, headGraph sdk.ConsolidatedGraph) *DiffModel
NewDiff constructs the diff TUI model. baseGraph and headGraph are the consolidated graphs from the two pipeline runs; they feed the Source tab.
func (DiffModel) ActiveTabID ¶
func (s DiffModel) ActiveTabID() string
ActiveTabID returns the ID string of the active tab, or "" if there are no tabs. Embedding models use it to branch View() or specialize behavior.
func (DiffModel) AppendSearch ¶
func (s DiffModel) AppendSearch(value string)
func (DiffModel) BackspaceSearch ¶
func (s DiffModel) BackspaceSearch()
func (DiffModel) BeginSearch ¶
func (s DiffModel) BeginSearch()
func (DiffModel) BlurDetails ¶
func (s DiffModel) BlurDetails()
func (DiffModel) CancelSearch ¶
func (s DiffModel) CancelSearch()
func (*DiffModel) CollapseAll ¶
func (m *DiffModel) CollapseAll()
CollapseAll closes every expandable node in the active tab.
func (*DiffModel) CollapseSelected ¶
func (m *DiffModel) CollapseSelected()
CollapseSelected forces the focused node closed.
func (DiffModel) ConfirmSearch ¶
func (s DiffModel) ConfirmSearch()
func (*DiffModel) CycleEcosystemFilter ¶
func (m *DiffModel) CycleEcosystemFilter()
CycleEcosystemFilter advances the ecosystem filter, drawn from the distinct ecosystems present across changed manifests.
func (*DiffModel) CycleGroup ¶
func (m *DiffModel) CycleGroup()
CycleGroup is the per-tab "g" key handler. Each tab interprets it differently (grouping axis, source-side focus).
func (*DiffModel) CycleRelationshipFilter ¶
func (m *DiffModel) CycleRelationshipFilter()
CycleRelationshipFilter advances the relationship filter on the Components tab (None → root → direct → transitive → None).
func (*DiffModel) CycleScopeFilter ¶
func (m *DiffModel) CycleScopeFilter()
CycleScopeFilter advances the scope filter (None → runtime → development → unset → None).
func (*DiffModel) CycleSeverityFilter ¶
func (m *DiffModel) CycleSeverityFilter()
CycleSeverityFilter advances the severity filter on the Components tab (driven by attached PackageRef.Vulnerabilities).
func (*DiffModel) ExpandAll ¶
func (m *DiffModel) ExpandAll()
ExpandAll opens every expandable node in the active tab.
func (*DiffModel) ExpandSelected ¶
func (m *DiffModel) ExpandSelected()
ExpandSelected forces the focused node open.
func (DiffModel) FocusDetails ¶
func (s DiffModel) FocusDetails()
func (DiffModel) IsDetailsFocused ¶
func (s DiffModel) IsDetailsFocused() bool
IsDetailsFocused / FocusDetails / BlurDetails delegate to the active listModel so the teaModel keyboard handler can drive focus uniformly regardless of which command owns the embedding model.
func (DiffModel) IsSearching ¶
func (s DiffModel) IsSearching() bool
func (DiffModel) List ¶
func (s DiffModel) List() *listModel
List exposes the active listModel so the embedding command can poke at it (e.g. preserve selected index across rebuilds).
func (DiffModel) Rebuild ¶
func (s DiffModel) Rebuild()
Rebuild re-invokes the active tab's Build func. Call after the embedding model mutates any state that the tab reads (filters, expansion maps, ...).
func (DiffModel) ScrollDetails ¶
func (s DiffModel) ScrollDetails(delta int)
func (DiffModel) SelectView ¶
func (s DiffModel) SelectView(index int)
SelectView jumps to the 1-indexed tab.
func (DiffModel) TabLine ¶
func (s DiffModel) TabLine() string
TabLine renders the active-tab-highlighted "[1] Foo | [2] Bar" strip.
func (*DiffModel) ToggleSelected ¶
func (m *DiffModel) ToggleSelected()
ToggleSelected toggles the expansion of the currently-focused tree node.
func (*DiffModel) View ¶
View overrides the embedded shellModel.View so the Overview tab can render its custom dashboard layout. All other tabs (including Source, which uses listModel.bodyOverride for its two-pane body) fall through to the shared shellModel renderer so the chrome stays identical.
func (*DiffModel) WithEnrichEnabled ¶
WithEnrichEnabled records whether enrichment ran, so empty Vuln/Findings tabs can distinguish "not requested" from "no matches".
func (*DiffModel) WithRegistry ¶
func (m *DiffModel) WithRegistry(base, head *sdk.PackageRegistry) *DiffModel
WithRegistry attaches the base/head package registries so source-tree package details can show matcher and analyzer enrichment by PURL.
type ScanModel ¶
type ScanModel struct {
// contains filtered or unexported fields
}
func NewExplain ¶
func NewExplain(project output.ProjectDescriptor, query string, consolidated sdk.ConsolidatedGraph, graphValue *sdk.Graph, findings []sdk.Finding) *ScanModel
func NewScan ¶
func NewScan(project output.ProjectDescriptor, consolidated sdk.ConsolidatedGraph, graphValue *sdk.Graph, findings []sdk.Finding) *ScanModel
func NewScanNavigator ¶
func NewScanNavigator(titlePrefix string, project output.ProjectDescriptor, consolidated sdk.ConsolidatedGraph, graphValue *sdk.Graph, findings []sdk.Finding) *ScanModel
func (ScanModel) ActiveTabID ¶
func (s ScanModel) ActiveTabID() string
ActiveTabID returns the ID string of the active tab, or "" if there are no tabs. Embedding models use it to branch View() or specialize behavior.
func (ScanModel) AppendSearch ¶
func (s ScanModel) AppendSearch(value string)
func (ScanModel) BackspaceSearch ¶
func (s ScanModel) BackspaceSearch()
func (ScanModel) BeginSearch ¶
func (s ScanModel) BeginSearch()
func (ScanModel) BlurDetails ¶
func (s ScanModel) BlurDetails()
func (ScanModel) CancelSearch ¶
func (s ScanModel) CancelSearch()
func (*ScanModel) CollapseAll ¶
func (m *ScanModel) CollapseAll()
func (*ScanModel) CollapseSelected ¶
func (m *ScanModel) CollapseSelected()
func (ScanModel) ConfirmSearch ¶
func (s ScanModel) ConfirmSearch()
func (*ScanModel) CycleEcosystemFilter ¶
func (m *ScanModel) CycleEcosystemFilter()
func (*ScanModel) CycleGroup ¶
func (m *ScanModel) CycleGroup()
func (*ScanModel) CycleReachabilityFilter ¶
func (m *ScanModel) CycleReachabilityFilter()
func (*ScanModel) CycleRelationshipFilter ¶
func (m *ScanModel) CycleRelationshipFilter()
func (*ScanModel) CycleScopeFilter ¶
func (m *ScanModel) CycleScopeFilter()
func (*ScanModel) CycleSeverityFilter ¶
func (m *ScanModel) CycleSeverityFilter()
func (*ScanModel) ExpandSelected ¶
func (m *ScanModel) ExpandSelected()
func (ScanModel) FocusDetails ¶
func (s ScanModel) FocusDetails()
func (ScanModel) IsDetailsFocused ¶
func (s ScanModel) IsDetailsFocused() bool
IsDetailsFocused / FocusDetails / BlurDetails delegate to the active listModel so the teaModel keyboard handler can drive focus uniformly regardless of which command owns the embedding model.
func (ScanModel) IsSearching ¶
func (s ScanModel) IsSearching() bool
func (ScanModel) List ¶
func (s ScanModel) List() *listModel
List exposes the active listModel so the embedding command can poke at it (e.g. preserve selected index across rebuilds).
func (*ScanModel) OpenSelected ¶
func (m *ScanModel) OpenSelected()
func (ScanModel) Rebuild ¶
func (s ScanModel) Rebuild()
Rebuild re-invokes the active tab's Build func. Call after the embedding model mutates any state that the tab reads (filters, expansion maps, ...).
func (ScanModel) ScrollDetails ¶
func (s ScanModel) ScrollDetails(delta int)
func (ScanModel) SelectView ¶
func (s ScanModel) SelectView(index int)
SelectView jumps to the 1-indexed tab.
func (ScanModel) TabLine ¶
func (s ScanModel) TabLine() string
TabLine renders the active-tab-highlighted "[1] Foo | [2] Bar" strip.
func (*ScanModel) ToggleSelected ¶
func (m *ScanModel) ToggleSelected()
func (*ScanModel) View ¶
View overrides shellModel.View so the Overview tab can render its custom dashboard layout. All other tabs fall through to the embedded shellModel's listModel rendering.
func (*ScanModel) WithEnrichEnabled ¶
WithEnrichEnabled records whether the scan requested enrichment so empty vulnerability states can distinguish "not requested" from "no matches".
func (*ScanModel) WithReachabilityEnabled ¶
WithReachabilityEnabled records whether the scan requested reachability analysis so the conditional interactive filter is only exposed for an explicitly enabled scan.
func (*ScanModel) WithRegistry ¶
func (m *ScanModel) WithRegistry(registry *sdk.PackageRegistry) *ScanModel
WithRegistry attaches the PURL-keyed package registry so the TUI can resolve vulnerabilities, licenses, and scorecards by reference. Must be called before the model is rendered for the first time when matching- stage data should be visible. Safe to pass nil.
type ShellSpec ¶
ShellSpec configures a shellModel: a top-bar line, a list of tabs, and optional footer lines. Commands (scan, diff, explain) construct one and embed *shellModel to inherit tab cycling, the tab strip, and listModel delegation.