Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateHTMLToPDF ¶
func GenerateHTMLToPDF(data ScanReportData) string
GenerateHTMLToPDF generates HTML content that can be converted to PDF
func GenerateSimplePDF ¶
func GenerateSimplePDF(data ScanReportData) ([]byte, error)
GenerateSimplePDF generates a simple text-based PDF content Note: This is a basic implementation. For production use, consider using a proper PDF library
Types ¶
type ScanReportData ¶
type ScanReportData struct {
ScanID string `json:"scan_id"`
Repository string `json:"repository"`
Platform string `json:"platform"`
Status string `json:"status"`
StartedAt time.Time `json:"started_at"`
CompletedAt time.Time `json:"completed_at"`
Duration string `json:"duration"`
Threats []ThreatInfo `json:"threats"`
Summary ScanSummary `json:"summary"`
Metadata map[string]interface{} `json:"metadata"`
}
ScanReportData represents the data structure for PDF reports
type ScanSummary ¶
type ScanSummary struct {
TotalPackages int `json:"total_packages"`
VulnerablePackages int `json:"vulnerable_packages"`
CriticalThreats int `json:"critical_threats"`
HighThreats int `json:"high_threats"`
MediumThreats int `json:"medium_threats"`
LowThreats int `json:"low_threats"`
}
ScanSummary represents scan summary statistics
Click to show internal directories.
Click to hide internal directories.