Skip to content

Commit 66eb27a

Browse files
committed
cli/command: remove deprecated NotaryClient from CLI interface
This method is a shallow wrapper around trust.GetNotaryRepository, but due to its signature resulted in the trust package, and notary dependencies to become a dependency of the CLI. Consequence of this was that cli-plugins, which need the cli/command package, would also get notary and its dependencies as a dependency. It is no longer used, and was deprecated in 9bc16bb. This patch removes the NotaryClient method from the interface Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent e002576 commit 66eb27a

2 files changed

Lines changed: 0 additions & 15 deletions

File tree

cli/command/cli.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ type Cli interface {
5656
CurrentContext() string
5757
DockerEndpoint() docker.Endpoint
5858
TelemetryClient
59-
DeprecatedNotaryClient
6059
DeprecatedManifestClient
6160
}
6261

cli/command/cli_deprecated.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,9 @@ import (
77
"github.com/docker/cli/cli/config"
88
manifeststore "github.com/docker/cli/cli/manifest/store"
99
registryclient "github.com/docker/cli/cli/registry/client"
10-
"github.com/docker/cli/cli/trust"
1110
"github.com/docker/docker/api/types/registry"
12-
notaryclient "github.com/theupdateframework/notary/client"
1311
)
1412

15-
type DeprecatedNotaryClient interface {
16-
// NotaryClient provides a Notary Repository to interact with signed metadata for an image
17-
//
18-
// Deprecated: use [trust.GetNotaryRepository] instead. This method is no longer used and will be removed in the next release.
19-
NotaryClient(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (notaryclient.Repository, error)
20-
}
21-
2213
type DeprecatedManifestClient interface {
2314
// ManifestStore returns a store for local manifests
2415
//
@@ -32,11 +23,6 @@ type DeprecatedManifestClient interface {
3223
RegistryClient(bool) registryclient.RegistryClient
3324
}
3425

35-
// NotaryClient provides a Notary Repository to interact with signed metadata for an image
36-
func (cli *DockerCli) NotaryClient(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (notaryclient.Repository, error) {
37-
return trust.GetNotaryRepository(cli.In(), cli.Out(), UserAgent(), imgRefAndAuth.RepoInfo(), imgRefAndAuth.AuthConfig(), actions...)
38-
}
39-
4026
// ManifestStore returns a store for local manifests
4127
//
4228
// Deprecated: use [manifeststore.NewStore] instead. This method is no longer used and will be removed in the next release.

0 commit comments

Comments
 (0)