Documentation
¶
Index ¶
- func WithProgress(message string, fn func() error) error
- func WithProgressSteps(message string, fn func(update func(string), progress func(int, int)) error) error
- type AdaptiveProgress
- func (ap *AdaptiveProgress) Error(err error)
- func (ap *AdaptiveProgress) SetPhases(phases []PhaseInfo)
- func (ap *AdaptiveProgress) Start(message string)
- func (ap *AdaptiveProgress) Success(message string)
- func (ap *AdaptiveProgress) SuccessWithStats(message string, stats AnalysisStats)
- func (ap *AdaptiveProgress) UpdatePhase(phaseName string)
- func (ap *AdaptiveProgress) UpdateProgress(percent float64, details string)
- type AnalysisStats
- type DoneMsg
- type Model
- type Msg
- type PhaseInfo
- type Runner
- type UpdateMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithProgress ¶
WithProgress runs a function with a progress indicator
Types ¶
type AdaptiveProgress ¶ added in v0.0.5
type AdaptiveProgress struct {
// contains filtered or unexported fields
}
AdaptiveProgress provides beautiful progress indication that works in both TTY and non-TTY environments
func NewAdaptiveProgress ¶ added in v0.0.5
func NewAdaptiveProgress(output io.Writer) *AdaptiveProgress
NewAdaptiveProgress creates a new adaptive progress indicator
func (*AdaptiveProgress) Error ¶ added in v0.0.5
func (ap *AdaptiveProgress) Error(err error)
Error completes with error
func (*AdaptiveProgress) SetPhases ¶ added in v0.0.5
func (ap *AdaptiveProgress) SetPhases(phases []PhaseInfo)
SetPhases defines the phases of the operation for better progress tracking
func (*AdaptiveProgress) Start ¶ added in v0.0.5
func (ap *AdaptiveProgress) Start(message string)
Start begins the progress indication
func (*AdaptiveProgress) Success ¶ added in v0.0.5
func (ap *AdaptiveProgress) Success(message string)
Success completes with success
func (*AdaptiveProgress) SuccessWithStats ¶ added in v0.0.5
func (ap *AdaptiveProgress) SuccessWithStats(message string, stats AnalysisStats)
SuccessWithStats completes with success and shows detailed statistics
func (*AdaptiveProgress) UpdatePhase ¶ added in v0.0.5
func (ap *AdaptiveProgress) UpdatePhase(phaseName string)
UpdatePhase moves to the next phase
func (*AdaptiveProgress) UpdateProgress ¶ added in v0.0.5
func (ap *AdaptiveProgress) UpdateProgress(percent float64, details string)
UpdateProgress updates the progress percentage and details
type AnalysisStats ¶ added in v0.0.5
type AnalysisStats struct {
Files int
Nodes int
Relationships int
Interfaces int
CallChains int
ProjectID string
}
AnalysisStats contains statistics from the analysis
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the progress indicator model
type PhaseInfo ¶ added in v0.0.5
type PhaseInfo struct {
Name string
Description string
Weight float64 // Relative weight for progress calculation
}
PhaseInfo represents a phase of the analysis process
type Runner ¶
type Runner struct {
// contains filtered or unexported fields
}
Runner provides a simple interface to run operations with progress
func (*Runner) SetProgress ¶
SetProgress updates the progress counter