(svc appServices, parent commandParent)
| 24 | } |
| 25 | |
| 26 | func (c *commandContentVerify) setup(svc appServices, parent commandParent) { |
| 27 | cmd := parent.Command("verify", "Verify that each content is backed by a valid blob") |
| 28 | |
| 29 | cmd.Flag("parallel", "Parallelism").Default("16").IntVar(&c.contentVerifyParallel) |
| 30 | cmd.Flag("full", "Full verification (including download)").BoolVar(&c.contentVerifyFull) |
| 31 | cmd.Flag("include-deleted", "Include deleted contents").BoolVar(&c.contentVerifyIncludeDeleted) |
| 32 | cmd.Flag("download-percent", "Download a percentage of files [0.0 .. 100.0]").Float64Var(&c.contentVerifyPercent) |
| 33 | cmd.Flag("progress-interval", "Progress output interval").Default("3s").DurationVar(&c.progressInterval) |
| 34 | c.contentRange.setup(cmd) |
| 35 | cmd.Action(svc.directRepositoryReadAction(c.run)) |
| 36 | } |
| 37 | |
| 38 | func (c *commandContentVerify) run(ctx context.Context, rep repo.DirectRepository) error { |
| 39 | var ( |
nothing calls this directly
no test coverage detected