MCPcopy Index your code
hub / github.com/kopia/kopia / loadSnapIDManifests

Method loadSnapIDManifests

cli/command_snapshot_verify.go:252–265  ·  view source on GitHub ↗

loadSnapIDManifests will return the list of manifests requested by the snapshot verify Arg values, to be interpreted as manifest IDs.

(ctx context.Context, rep repo.Repository)

Source from the content-addressed store, hash-verified

250// loadSnapIDManifests will return the list of manifests requested by the
251// snapshot verify Arg values, to be interpreted as manifest IDs.
252func (c *commandSnapshotVerify) loadSnapIDManifests(ctx context.Context, rep repo.Repository) ([]*snapshot.Manifest, error) {
253 manifestIDs := toManifestIDs(c.verifyCommandSnapshotIDs)
254
255 manifests, err := snapshot.LoadSnapshots(ctx, rep, manifestIDs)
256 if err != nil {
257 return nil, errors.Wrap(err, "unable to load snapshot manifests")
258 }
259
260 if len(manifests) != len(manifestIDs) {
261 return nil, errors.Errorf("found %d of the %d requested snapshot IDs to verify", len(manifests), len(manifestIDs))
262 }
263
264 return manifests, nil
265}

Callers 1

makeVerifyWalkerFuncMethod · 0.95

Calls 3

LoadSnapshotsFunction · 0.92
toManifestIDsFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected