Documentation
¶
Index ¶
- type ScanMetadata
- func (m *ScanMetadata) SetDuration(duration time.Duration)
- func (m *ScanMetadata) SetFileCounts(fileCount, componentCount int)
- func (m *ScanMetadata) SetFormat(format string)
- func (m *ScanMetadata) SetLanguageCount(languageCount int)
- func (m *ScanMetadata) SetProperties(properties map[string]interface{})
- func (m *ScanMetadata) SetTechCounts(techCount, techsCount int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScanMetadata ¶
type ScanMetadata struct {
Format string `json:"format"` // Output format: "full" or "aggregated"
Source string `json:"source"` // Tool that created this file
Timestamp string `json:"timestamp"`
ScanPath string `json:"scan_path"`
SpecVersion string `json:"specVersion"` // Output format specification version
DurationMs int64 `json:"duration_ms,omitempty"`
FileCount int `json:"file_count,omitempty"`
ComponentCount int `json:"component_count,omitempty"`
LanguageCount int `json:"language_count,omitempty"` // Number of distinct programming languages
TechCount int `json:"tech_count,omitempty"` // Number of primary technologies
TechsCount int `json:"techs_count,omitempty"` // Number of all detected technologies
Properties map[string]interface{} `json:"properties,omitempty"`
}
ScanMetadata contains information about the scan execution
func NewScanMetadata ¶
func NewScanMetadata(scanPath string, version string) *ScanMetadata
NewScanMetadata creates a new scan metadata instance
func (*ScanMetadata) SetDuration ¶
func (m *ScanMetadata) SetDuration(duration time.Duration)
SetDuration sets the scan duration in milliseconds
func (*ScanMetadata) SetFileCounts ¶
func (m *ScanMetadata) SetFileCounts(fileCount, componentCount int)
SetFileCounts sets the file and component counts
func (*ScanMetadata) SetFormat ¶
func (m *ScanMetadata) SetFormat(format string)
SetFormat sets the output format type
func (*ScanMetadata) SetLanguageCount ¶
func (m *ScanMetadata) SetLanguageCount(languageCount int)
SetLanguageCount sets the number of distinct programming languages
func (*ScanMetadata) SetProperties ¶
func (m *ScanMetadata) SetProperties(properties map[string]interface{})
SetProperties sets custom properties from configuration
func (*ScanMetadata) SetTechCounts ¶
func (m *ScanMetadata) SetTechCounts(techCount, techsCount int)
SetTechCounts sets the primary and total technology counts
Click to show internal directories.
Click to hide internal directories.