Documentation
¶
Overview ¶
Package verify checks that a backup made by sync holds everything GitHub has. It is what decides whether a repo is safe to delete from GitHub, so a check that cannot run counts as a failure, never as a pass.
Index ¶
Constants ¶
View Source
const ReportFile = "verify-report.json"
ReportFile is the name of the report written into the target directory
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// Target is the backup directory
Target string
// AllOrgs checks the token's account plus all its orgs (User may name the account)
AllOrgs bool
// User checks one user's repos
User string
// Org checks one org's repos
Org string
// Gists also checks the token account's gists
Gists bool
// Metadata also checks the metadata export
Metadata bool
}
Options says what to check
type Report ¶
type Report struct {
Time time.Time `json:"time"`
Target string `json:"target"`
OK bool `json:"ok"`
// Checks names every check that ran
Checks []string `json:"checks"`
// Checked counts repos, wikis and gists looked at
Checked int `json:"checked"`
// Items names every repo, wiki and gist looked at, so a repo can be found here before deleting it
Items []string `json:"items"`
Missing []string `json:"missing"`
Corrupt []string `json:"corrupt"`
Stale []string `json:"stale"`
LFS []string `json:"lfs"`
// Submodules not checked out at the recorded commit, or failing git fsck
Submodules []string `json:"submodules"`
Metadata []string `json:"metadata"`
// Errors are checks that could not run; each one fails the backup
Errors []string `json:"errors"`
}
Report is the outcome of a check; OK is true only when every list is empty
Click to show internal directories.
Click to hide internal directories.