list

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	// Path is the full path to the job's PAR2 file.
	Path string `json:"path"`

	// Status is the derived job status (e.g. healthy, repairable).
	Status string `json:"status"`

	// IsBundle is true if the job is a bundle.
	IsBundle bool `json:"is_bundle"`

	// IsCached is true if the job exists in provided --cache.
	IsCached bool `json:"is_cached"`

	// HasManifest is true if the job has a manifest.
	HasManifest bool `json:"has_manifest"`

	// HasCreation is true if the manifest contains creation data.
	HasCreation bool `json:"has_creation"`

	// HasVerification is true if the manifest contains verification data.
	HasVerification bool `json:"has_verification"`

	// Verification contains the last verification result, if any.
	Verification *Verification `json:"verification,omitempty"`
}

Job describes a single discovered job.

type Options

type Options struct {
	SkipNotCreated bool   `json:"skip_not_created"`
	CacheDir       string `json:"cache_dir"`
}

type Result

type Result struct {
	// Root directories for this result.
	Roots []string `json:"roots"`

	// Time is when this result was generated.
	Time time.Time `json:"time"`

	// Options are the arguments used for this list run.
	Options *Options `json:"options"`

	// Jobs are the discovered jobs, ordered by severity and then path.
	Jobs []*Job `json:"jobs"`

	// Warning indicates issues encountered during enumeration.
	Warning string `json:"warning,omitempty"`
}

Result contains the complete list command output.

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(fsys afero.Fs, log *logging.Logger, runner schema.CommandRunner, bundler schema.BundleHandler, par2er schema.Par2Handler, cacher schema.CacheHandler) *Service

func (*Service) List

func (prog *Service) List(ctx context.Context, rootDirs []string, opts Options) error

func (*Service) PrintJSON

func (prog *Service) PrintJSON(ctx context.Context, rootDirs []string, opts Options) error

func (*Service) Result

func (prog *Service) Result(ctx context.Context, rootDirs []string, opts Options) (*Result, error)

type Verification

type Verification struct {
	// Time is when the last verification happened.
	Time time.Time `json:"time"`

	// Duration is how long the last verification took.
	Duration time.Duration `json:"duration_ns"`

	// CountCorrupted is how many consecutive verifications found corruption.
	CountCorrupted int `json:"count_corrupted"`

	// RepairNeeded is true if corruption was found.
	RepairNeeded bool `json:"repair_needed"`

	// RepairPossible is true if the corruption can be repaired.
	RepairPossible bool `json:"repair_possible"`

	// MaybeEdited is true if protected files may have been modified since creation.
	MaybeEdited bool `json:"maybe_edited"`
}

Verification contains the result of a job's last verification.

Jump to

Keyboard shortcuts

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