history

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadScanResult

func LoadScanResult(filename string) (*engine.ScoreResult, error)

LoadScanResult loads only the ScoreResult from a saved scan.

func SaveScan

func SaveScan(result engine.ScoreResult, target string, duration time.Duration) error

SaveScan persists a scan result to ~/.vx/scans/.

Types

type ScanDiff

type ScanDiff struct {
	ScoreA        int              `json:"score_a"`
	ScoreB        int              `json:"score_b"`
	Delta         int              `json:"delta"`
	NewFindings   []engine.Finding `json:"new_findings"`
	FixedFindings []engine.Finding `json:"fixed_findings"`
}

ScanDiff represents the difference between two scans.

func ComparScans

func ComparScans(a, b string) (*ScanDiff, error)

ComparScans compares two saved scans and returns the diff.

type ScanEntry

type ScanEntry struct {
	Filename string        `json:"filename"`
	Target   string        `json:"target"`
	Date     time.Time     `json:"date"`
	Score    int           `json:"score"`
	Grade    engine.Grade  `json:"grade"`
	Findings int           `json:"findings"`
	Duration time.Duration `json:"duration"`
}

ScanEntry represents metadata for a saved scan.

func ListScans

func ListScans() ([]ScanEntry, error)

ListScans returns all saved scans sorted by date (newest first).

type StoredScan

type StoredScan struct {
	Target   string             `json:"target"`
	Date     time.Time          `json:"date"`
	Duration time.Duration      `json:"duration"`
	Result   engine.ScoreResult `json:"result"`
}

StoredScan is the full JSON structure saved to disk.

func LoadScan

func LoadScan(filename string) (*StoredScan, error)

LoadScan loads a full scan result from a filename.

Jump to

Keyboard shortcuts

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