Skip to content

Commit 65496c5

Browse files
committed
cli/trust: use local definition for PushResult Aux message
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 3434869 commit 65496c5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

cli/trust/trust_push.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"github.com/distribution/reference"
1313
"github.com/docker/cli/cli/streams"
1414
"github.com/docker/cli/internal/jsonstream"
15-
"github.com/moby/moby/api/types"
1615
registrytypes "github.com/moby/moby/api/types/registry"
1716
"github.com/opencontainers/go-digest"
1817
"github.com/theupdateframework/notary/client"
@@ -28,6 +27,15 @@ type Streams interface {
2827
Err() *streams.Out
2928
}
3029

30+
// PushResult contains the tag, manifest digest, and manifest size from the
31+
// push. It's used to signal this information to the trust code in the client
32+
// so it can sign the manifest if necessary.
33+
type PushResult struct {
34+
Tag string
35+
Digest string
36+
Size int
37+
}
38+
3139
// PushTrustedReference pushes a canonical reference to the trust server.
3240
//
3341
//nolint:gocyclo
@@ -45,7 +53,7 @@ func PushTrustedReference(ctx context.Context, ioStreams Streams, repoInfo *Repo
4553
return
4654
}
4755

48-
var pushResult types.PushResult
56+
var pushResult PushResult
4957
err := json.Unmarshal(*msg.Aux, &pushResult)
5058
if err == nil && pushResult.Tag != "" {
5159
if dgst, err := digest.Parse(pushResult.Digest); err == nil {

0 commit comments

Comments
 (0)