MCPcopy
hub / github.com/kopia/kopia / run

Method run

cli/command_snapshot_list.go:122–143  ·  view source on GitHub ↗
(ctx context.Context, rep repo.Repository)

Source from the content-addressed store, hash-verified

120}
121
122func (c *commandSnapshotList) run(ctx context.Context, rep repo.Repository) error {
123 tags, err := getTags(c.snapshotListTags)
124 if err != nil {
125 return err
126 }
127
128 manifestIDs, fullPath, err := findManifestIDs(ctx, rep, c.snapshotListPath, tags)
129 if err != nil {
130 return err
131 }
132
133 manifests, err := snapshot.LoadSnapshots(ctx, rep, manifestIDs)
134 if err != nil {
135 return errors.Wrap(err, "unable to load snapshots")
136 }
137
138 if c.jo.jsonOutput {
139 return c.outputJSON(ctx, rep, manifests)
140 }
141
142 return c.outputManifestGroups(ctx, rep, manifests, fullPath)
143}
144
145// SnapshotManifest defines the JSON output for the CLI snapshot commands.
146type SnapshotManifest struct {

Callers

nothing calls this directly

Calls 5

outputJSONMethod · 0.95
outputManifestGroupsMethod · 0.95
LoadSnapshotsFunction · 0.92
getTagsFunction · 0.85
findManifestIDsFunction · 0.85

Tested by

no test coverage detected