Skip to content

Commit 255a5f6

Browse files
authored
Merge pull request #5876 from thaJeztah/less_notary
cli/command, cil/command/image: remove deprecated methods and functions
2 parents b199ece + 4541df2 commit 255a5f6

3 files changed

Lines changed: 0 additions & 88 deletions

File tree

cli/command/cli.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ type Cli interface {
5656
CurrentContext() string
5757
DockerEndpoint() docker.Endpoint
5858
TelemetryClient
59-
DeprecatedNotaryClient
60-
DeprecatedManifestClient
6159
}
6260

6361
// DockerCli is an instance the docker command line client.

cli/command/cli_deprecated.go

Lines changed: 0 additions & 56 deletions
This file was deleted.

cli/command/image/trust.go

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,6 @@ func newNotaryClient(cli command.Streams, imgRefAndAuth trust.ImageRefAndAuth) (
4141
return trust.GetNotaryRepository(cli.In(), cli.Out(), command.UserAgent(), imgRefAndAuth.RepoInfo(), imgRefAndAuth.AuthConfig(), "pull")
4242
}
4343

44-
// TrustedPush handles content trust pushing of an image.
45-
//
46-
// Deprecated: this function was only used internally and will be removed in the next release.
47-
func TrustedPush(ctx context.Context, cli command.Cli, repoInfo *registry.RepositoryInfo, ref reference.Named, authConfig registrytypes.AuthConfig, options image.PushOptions) error {
48-
responseBody, err := cli.Client().ImagePush(ctx, reference.FamiliarString(ref), options)
49-
if err != nil {
50-
return err
51-
}
52-
53-
defer responseBody.Close()
54-
55-
return trust.PushTrustedReference(ctx, cli, repoInfo, ref, authConfig, responseBody, command.UserAgent())
56-
}
57-
58-
// PushTrustedReference pushes a canonical reference to the trust server.
59-
//
60-
// Deprecated: use [trust.PushTrustedReference] instead. this function was only used internally and will be removed in the next release.
61-
func PushTrustedReference(ctx context.Context, ioStreams command.Streams, repoInfo *registry.RepositoryInfo, ref reference.Named, authConfig registrytypes.AuthConfig, in io.Reader) error {
62-
return pushTrustedReference(ctx, ioStreams, repoInfo, ref, authConfig, in)
63-
}
64-
6544
// pushTrustedReference pushes a canonical reference to the trust server.
6645
func pushTrustedReference(ctx context.Context, ioStreams command.Streams, repoInfo *registry.RepositoryInfo, ref reference.Named, authConfig registrytypes.AuthConfig, in io.Reader) error {
6746
return trust.PushTrustedReference(ctx, ioStreams, repoInfo, ref, authConfig, in, command.UserAgent())
@@ -229,15 +208,6 @@ func convertTarget(t client.Target) (target, error) {
229208
}, nil
230209
}
231210

232-
// TagTrusted tags a trusted ref. It is a shallow wrapper around APIClient.ImageTag
233-
// that updates the given image references to their familiar format for tagging
234-
// and printing.
235-
//
236-
// Deprecated: this function was only used internally, and will be removed in the next release.
237-
func TagTrusted(ctx context.Context, cli command.Cli, trustedRef reference.Canonical, ref reference.NamedTagged) error {
238-
return trust.TagTrusted(ctx, cli.Client(), cli.Err(), trustedRef, ref)
239-
}
240-
241211
// AuthResolver returns an auth resolver function from a command.Cli
242212
func AuthResolver(cli command.Cli) func(ctx context.Context, index *registrytypes.IndexInfo) registrytypes.AuthConfig {
243213
return func(ctx context.Context, index *registrytypes.IndexInfo) registrytypes.AuthConfig {

0 commit comments

Comments
 (0)