Introduce ListBlobsV2()

Returns not only blob names, but also their sizes.

References:
 https://github.com/restic/restic/issues/1567
 https://github.com/restic/restic/pull/1571
This commit is contained in:
Zlatko Čalušić 2018-01-22 17:13:01 +01:00
parent 55134ae37a
commit cd4d054887
2 changed files with 62 additions and 0 deletions

2
mux.go
View file

@ -72,6 +72,8 @@ func NewMux() *goji.Mux {
mux.HandleFunc(pat.Post("/:repo/config"), SaveConfig)
mux.HandleFunc(pat.Delete("/config"), DeleteConfig)
mux.HandleFunc(pat.Delete("/:repo/config"), DeleteConfig)
mux.HandleFunc(pat.Get("/v2/:type/"), ListBlobsV2)
mux.HandleFunc(pat.Get("/v2/:repo/:type/"), ListBlobsV2)
mux.HandleFunc(pat.Get("/:type/"), ListBlobs)
mux.HandleFunc(pat.Get("/:repo/:type/"), ListBlobs)
mux.HandleFunc(pat.Head("/:type/:name"), CheckBlob)