Break down type dependencies

Each type no longer requires holding a reference to repository.
Added implementation for signatures get.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
This commit is contained in:
Derek McGowan 2015-05-19 19:56:27 -07:00
parent a3276fcc5b
commit 13894e8736
2 changed files with 32 additions and 16 deletions

View file

@ -14,8 +14,8 @@ import (
)
type httpBlobUpload struct {
repo distribution.Repository
client *http.Client
statter distribution.BlobStatter
client *http.Client
uuid string
startedAt time.Time
@ -146,7 +146,7 @@ func (hbu *httpBlobUpload) Commit(ctx context.Context, desc distribution.Descrip
return distribution.Descriptor{}, hbu.handleErrorResponse(resp)
}
return hbu.repo.Blobs(ctx).Stat(ctx, desc.Digest)
return hbu.statter.Stat(ctx, desc.Digest)
}
func (hbu *httpBlobUpload) Cancel(ctx context.Context) error {