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 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
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.
Click to show internal directories.
Click to hide internal directories.