metadata

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL