Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotInSumDB = errors.New("module version not found in checksum database")
ErrNotInSumDB indicates the module version is absent from the checksum database (e.g. a private module). Callers must treat this as "cannot verify" and keep the module.
Functions ¶
Types ¶
type Report ¶
type Report struct {
Matched int // stored hash == canonical
Mismatched int // stored hash != canonical
Purged int // mismatches deleted (purge mode)
SkippedPrivate int // matched a NoSumPattern, never looked up
SkippedUnknown int // absent from the checksum DB (ErrNotInSumDB)
Unverified int // transient/storage/oracle error; kept
DeleteErrors int // Delete failed in purge mode
}
Report tallies the outcome of a sweep.
func Sweep ¶
func Sweep(ctx context.Context, s Store, o Oracle, skip func(mod string) bool, purge bool, out io.Writer) (Report, error)
Sweep verifies every catalogued module version against the oracle. skip reports whether a module is private and MUST be consulted before any oracle lookup (to avoid leaking private module paths). When purge is true, mismatches are deleted; otherwise they are only reported.
Click to show internal directories.
Click to hide internal directories.