Documentation
¶
Overview ¶
Package tui provides an interactive terminal user interface for Indago.
Package tui provides an interactive terminal user interface for Indago.
Package tui provides an interactive terminal user interface for Indago.
Index ¶
- func RunInteractive() error
- func SeverityColor(severity string) lipgloss.Color
- type Model
- func (m *Model) GetTriageDecisions() map[int]string
- func (m *Model) Init() tea.Cmd
- func (m *Model) SetChannels(progress <-chan ProgressUpdate, findings <-chan types.Finding, ...)
- func (m *Model) SetScanState(state ScanState)
- func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)
- func (m *Model) View() string
- type ProgressUpdate
- type Runner
- func (r *Runner) GetPauseChannel() <-chan bool
- func (r *Runner) GetTriageDecisions() map[int]string
- func (r *Runner) SendFinding(finding types.Finding)
- func (r *Runner) SendProgress(update ProgressUpdate)
- func (r *Runner) SignalDone()
- func (r *Runner) Start(ctx context.Context) error
- func (r *Runner) Stop()
- type ScanState
- type StyledView
- func (v *StyledView) RenderFinding(f types.Finding, selected bool) string
- func (v *StyledView) RenderFindingDetail(f types.Finding) string
- func (v *StyledView) RenderFooter() string
- func (v *StyledView) RenderHeader() string
- func (v *StyledView) RenderHelp() string
- func (v *StyledView) RenderProgressBar(label string, current, total int, width int) string
- func (v *StyledView) RenderStats() string
- func (v *StyledView) RenderStatus() string
- type ViewMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunInteractive ¶
func RunInteractive() error
RunInteractive runs the TUI with simulated data for testing.
func SeverityColor ¶
SeverityColor returns the lipgloss color for a severity level.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the TUI application state.
func (*Model) GetTriageDecisions ¶
GetTriageDecisions returns the triage decisions made.
func (*Model) SetChannels ¶
func (m *Model) SetChannels(progress <-chan ProgressUpdate, findings <-chan types.Finding, done <-chan struct{}, pause chan<- bool)
SetChannels sets the communication channels for the model.
func (*Model) SetScanState ¶
SetScanState updates the scan state.
type ProgressUpdate ¶
type ProgressUpdate struct {
TotalEndpoints int
ScannedEndpoints int
TotalRequests int
CompletedReqs int
CurrentEndpoint string
RequestsPerSec float64
}
ProgressUpdate represents a progress update from the scanner.
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner manages the TUI lifecycle and integration with the scanner.
func (*Runner) GetPauseChannel ¶
GetPauseChannel returns the pause control channel.
func (*Runner) GetTriageDecisions ¶
GetTriageDecisions returns the triage decisions made by the user.
func (*Runner) SendFinding ¶
SendFinding sends a finding to the TUI.
func (*Runner) SendProgress ¶
func (r *Runner) SendProgress(update ProgressUpdate)
SendProgress sends a progress update to the TUI.
func (*Runner) SignalDone ¶
func (r *Runner) SignalDone()
SignalDone signals that the scan is complete.
type StyledView ¶
type StyledView struct {
// contains filtered or unexported fields
}
StyledView provides styled rendering methods.
func NewStyledView ¶
func NewStyledView(model *Model) *StyledView
NewStyledView creates a new styled view.
func (*StyledView) RenderFinding ¶
func (v *StyledView) RenderFinding(f types.Finding, selected bool) string
RenderFinding renders a single finding with appropriate severity styling.
func (*StyledView) RenderFindingDetail ¶
func (v *StyledView) RenderFindingDetail(f types.Finding) string
RenderFindingDetail renders detailed finding information.
func (*StyledView) RenderFooter ¶
func (v *StyledView) RenderFooter() string
RenderFooter renders the styled footer.
func (*StyledView) RenderHeader ¶
func (v *StyledView) RenderHeader() string
RenderHeader renders a styled header.
func (*StyledView) RenderHelp ¶
func (v *StyledView) RenderHelp() string
RenderHelp renders styled help text.
func (*StyledView) RenderProgressBar ¶
func (v *StyledView) RenderProgressBar(label string, current, total int, width int) string
RenderProgressBar renders a styled progress bar.
func (*StyledView) RenderStats ¶
func (v *StyledView) RenderStats() string
RenderStats renders scan statistics.
func (*StyledView) RenderStatus ¶
func (v *StyledView) RenderStatus() string
RenderStatus renders the scan status with appropriate styling.