aptly icon indicating copy to clipboard operation
aptly copied to clipboard

snapshot api should allow mapping to source of snapshot

Open hsitter opened this issue 9 years ago • 0 comments

Currently it is impossible to find out what source a Snapshot was generated from since the relevant fields of the struct are not serialized into json.

    SourceKind string   `json:"-"`
    SourceIDs  []string `json:"-"`

This makes it a client side problem to establish some sort of link between a repo and a snapshot. For example there is no builtin way to list all snapshots of a repo, or list all snapshots and then map them to their source repo.

To facilitate more accurate snapshot management I think a serialized Snapshot struct should have the same attributes as a PublishedRepository {"SourceKind":"local","Sources":[{"Component":"main","Name":"local-repo"}]}

hsitter avatar Jul 01 '16 10:07 hsitter