check

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package check provides repository integrity verification at three levels.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error struct {
	Pack    string
	BlobID  string
	Message string
}

Error describes a single integrity violation.

type Level

type Level int

Level determines the depth of integrity checking.

const (
	// LevelStructure verifies indexes, snapshot references. No data download.
	LevelStructure Level = iota
	// LevelHeaders downloads pack headers, verifies against index.
	LevelHeaders
	// LevelFull decrypts every blob and verifies content IDs.
	LevelFull
)

type Report

type Report struct {
	Level            Level
	PacksChecked     int
	BlobsChecked     int
	SnapshotsChecked int
	Errors           []Error
}

Report contains the results of an integrity check.

func Run

func Run(ctx context.Context, r *repo.Repository, level Level) (*Report, error)

Run performs an integrity check on the repository at the specified level.

func (*Report) OK

func (r *Report) OK() bool

OK returns true if no errors were found.

Jump to

Keyboard shortcuts

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