records

package
v0.0.0-...-a14cbf1 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDiffScanRecord

func AddDiffScanRecord(rootPath string, isComprehensive bool, d diff.ScanDiff) error

Record that a new scan has been generated (i.e. .tree file)

func AddFullScanRecord

func AddFullScanRecord(t tree.FileTree) error

Record that a new diff has been generated (i.e. .diff file)

func GetAllScansDiff

func GetAllScansDiff() *map[string]DiffRecords

func GetAllScansFull

func GetAllScansFull() *map[string]ScanRecords

func GetLastScanFilename

func GetLastScanFilename(rootPath string, isDiff bool) string

Get the filename of the LAST completed scan (for either a 'diff' or 'full' scan)

func GetNewScanFilename

func GetNewScanFilename(rootPath string, isDiff bool) string

Get the filename for the NEXT scan (for either a 'diff' or 'full' scan)

func GetScanFilename

func GetScanFilename(rootPath string, index int, isDiff bool) string

Get the filename for a scan at an index (for either a 'diff' or 'full' scan)

func Load

func Load() error

func RevertDiffScanRecord

func RevertDiffScanRecord(rootPath string, isComprehensive bool, d diff.ScanDiff) error

Revert the record of the LAST generated scan (i.e. .tree file)

func RevertFullScanRecord

func RevertFullScanRecord(t tree.FileTree) error

Revert the record of the LAST generated diff (i.e. .diff file)

Types

type AllRecords

type AllRecords struct {
	Scans map[string]ScanRecords `json:"scans"`
	Diffs map[string]DiffRecords `json:"diffs"`
}

func (*AllRecords) Flush

func (s *AllRecords) Flush() error

type DiffRecords

type DiffRecords struct {
	Records []Record `json:"records"`
}

func GetScansDiff

func GetScansDiff(path string) *DiffRecords

type Record

type Record struct {
	IsComprehensive bool
	TimeCompleted   time.Time
}

type ScanRecords

type ScanRecords struct {
	Records     []Record `json:"records"`
	CurrScanNum int      `json:"currScanNum"`
}

func GetScansFull

func GetScansFull(path string) *ScanRecords

Jump to

Keyboard shortcuts

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