Documentation
¶
Index ¶
- type Event
- type EventType
- type Handler
- type NullHandler
- type Progress
- func (p *Progress) ComponentDetected(name, tech, path string)
- func (p *Progress) EnableRuleTracing()
- func (p *Progress) EnableTimings()
- func (p *Progress) EnterDirectory(path string)
- func (p *Progress) FileProcessing(path, info string)
- func (p *Progress) FileProcessingEnd(path string)
- func (p *Progress) FileWriting(path string)
- func (p *Progress) FileWritten(path string)
- func (p *Progress) FolderFileProcessingEnd(path string)
- func (p *Progress) FolderFileProcessingStart(path string)
- func (p *Progress) GitIgnoreEnter(path string)
- func (p *Progress) GitIgnoreLeave(path string)
- func (p *Progress) Info(message string)
- func (p *Progress) LeaveDirectory(path string)
- func (p *Progress) ProgressUpdate(files, dirs int)
- func (p *Progress) Report(event Event)
- func (p *Progress) RuleCheck(tech string, details []string)
- func (p *Progress) RuleResult(tech string, matched bool, reason string)
- func (p *Progress) RuleResultWithPath(tech string, matched bool, reason string, path string)
- func (p *Progress) ScanComplete(files, _ int, duration time.Duration)
- func (p *Progress) ScanInitializing(path string, excludePatterns []string)
- func (p *Progress) ScanStart(path string, excludePatterns []string)
- func (p *Progress) Skipped(path, reason string)
- type Reporter
- type RuleEntry
- type SimpleHandler
- type TimingEntry
- type TreeHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Type EventType
Path string
Name string
Tech string
Info string
Reason string
FileCount int
DirCount int
Duration time.Duration
Timestamp time.Time // For timing calculations
Matched bool // For rule matching results
Details []string // For detailed rule check information
}
Event represents something that happened during scanning
type EventType ¶
type EventType int
EventType represents the type of progress event
const ( EventScanStart EventType = iota EventScanComplete EventEnterDirectory EventLeaveDirectory EventComponentDetected EventFileProcessingStart EventFileProcessingEnd EventFolderFileProcessingStart EventFolderFileProcessingEnd EventSkipped EventProgress EventScanInitializing EventFileWriting EventFileWritten EventInfo EventRuleCheck EventRuleResult EventGitIgnoreEnter EventGitIgnoreLeave )
type Handler ¶
type Handler interface {
Handle(event Event)
}
Handler processes events and produces output
type NullHandler ¶
type NullHandler struct{}
NullHandler discards all events (for disabled verbose mode)
func NewNullHandler ¶
func NewNullHandler() *NullHandler
func (*NullHandler) Handle ¶
func (h *NullHandler) Handle(event Event)
type Progress ¶
type Progress struct {
// contains filtered or unexported fields
}
Progress manages scan progress reporting with different handlers
func (*Progress) ComponentDetected ¶
func (*Progress) EnableRuleTracing ¶
func (p *Progress) EnableRuleTracing()
EnableRuleTracing enables detailed rule matching information
func (*Progress) EnableTimings ¶
func (p *Progress) EnableTimings()
EnableTimings enables timing information in progress output
func (*Progress) EnterDirectory ¶
EnterDirectory reports entering a directory (timing tracked via FolderFileProcessing events)
func (*Progress) FileProcessing ¶
func (*Progress) FileProcessingEnd ¶
func (*Progress) FileWriting ¶
func (*Progress) FileWritten ¶
func (*Progress) FolderFileProcessingEnd ¶
func (*Progress) FolderFileProcessingStart ¶
func (*Progress) GitIgnoreEnter ¶
func (*Progress) GitIgnoreLeave ¶
func (*Progress) LeaveDirectory ¶
LeaveDirectory reports leaving a directory
func (*Progress) ProgressUpdate ¶
func (*Progress) RuleResult ¶
func (*Progress) RuleResultWithPath ¶
func (*Progress) ScanComplete ¶
func (*Progress) ScanInitializing ¶
type Reporter ¶
type Reporter interface {
Report(event Event)
}
Reporter is the interface the scanner uses to report events
type SimpleHandler ¶
type SimpleHandler struct {
// contains filtered or unexported fields
}
SimpleHandler outputs events as simple lines (no tree)
func NewSimpleHandler ¶
func NewSimpleHandler(writer io.Writer) *SimpleHandler
func (*SimpleHandler) Handle ¶
func (h *SimpleHandler) Handle(event Event)
type TimingEntry ¶
TimingEntry represents a directory timing for analysis
type TreeHandler ¶
type TreeHandler struct {
// contains filtered or unexported fields
}
TreeHandler outputs events with tree-like visualization
func NewTreeHandler ¶
func NewTreeHandler(writer io.Writer) *TreeHandler
func (*TreeHandler) Handle ¶
func (h *TreeHandler) Handle(event Event)