Skip to content

Commit 13010ba

Browse files
committed
cli/registry/client: deprecate and move internal
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent c2a042e commit 13010ba

File tree

8 files changed

+29
-8
lines changed

8 files changed

+29
-8
lines changed

‎cli/command/manifest/annotate.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/docker/cli/cli/command"
1010
"github.com/docker/cli/cli/config"
1111
"github.com/docker/cli/cli/manifest/store"
12-
registryclient "github.com/docker/cli/cli/registry/client"
12+
"github.com/docker/cli/internal/registryclient"
1313
"github.com/moby/moby/api/types/registry"
1414
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
1515
"github.com/spf13/cobra"

‎cli/command/manifest/client_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/distribution/reference"
77
manifesttypes "github.com/docker/cli/cli/manifest/types"
8-
"github.com/docker/cli/cli/registry/client"
8+
"github.com/docker/cli/internal/registryclient"
99
"github.com/docker/distribution"
1010
"github.com/opencontainers/go-digest"
1111
)
@@ -45,4 +45,4 @@ func (c *fakeRegistryClient) PutManifest(ctx context.Context, ref reference.Name
4545
return digest.Digest(""), nil
4646
}
4747

48-
var _ client.RegistryClient = &fakeRegistryClient{}
48+
var _ registryclient.RegistryClient = &fakeRegistryClient{}

‎cli/command/manifest/push.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"github.com/docker/cli/cli"
1111
"github.com/docker/cli/cli/command"
1212
"github.com/docker/cli/cli/manifest/types"
13-
registryclient "github.com/docker/cli/cli/registry/client"
13+
"github.com/docker/cli/internal/registryclient"
1414
"github.com/docker/distribution"
1515
"github.com/docker/distribution/manifest/manifestlist"
1616
"github.com/docker/distribution/manifest/ocischema"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package client // Deprecated: this package was only used internally and will be removed in the next release.
2+
3+
import "github.com/docker/cli/internal/registryclient"
4+
5+
// RegistryClient is a client used to communicate with a Docker distribution
6+
// registry.
7+
//
8+
// Deprecated: this interface was only used internally and will be removed in the next release.
9+
type RegistryClient = registryclient.RegistryClient
10+
11+
// NewRegistryClient returns a new RegistryClient with a resolver
12+
//
13+
// Deprecated: this function was only used internally and will be removed in the next release.
14+
func NewRegistryClient(resolver registryclient.AuthConfigResolver, userAgent string, insecure bool) registryclient.RegistryClient {
15+
return registryclient.NewRegistryClient(resolver, userAgent, insecure)
16+
}
17+
18+
// AuthConfigResolver returns Auth Configuration for an index
19+
//
20+
// Deprecated: this type was only used internally and will be removed in the next release.
21+
type AuthConfigResolver = registryclient.AuthConfigResolver

‎cli/registry/client/client.go‎ renamed to ‎internal/registryclient/client.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package client
1+
package registryclient
22

33
import (
44
"context"

‎cli/registry/client/endpoint.go‎ renamed to ‎internal/registryclient/endpoint.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package client
1+
package registryclient
22

33
import (
44
"context"

‎cli/registry/client/fetcher.go‎ renamed to ‎internal/registryclient/fetcher.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package client
1+
package registryclient
22

33
import (
44
"context"

‎internal/test/cli.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import (
1111
"github.com/docker/cli/cli/context/docker"
1212
"github.com/docker/cli/cli/context/store"
1313
manifeststore "github.com/docker/cli/cli/manifest/store"
14-
registryclient "github.com/docker/cli/cli/registry/client"
1514
"github.com/docker/cli/cli/streams"
1615
"github.com/docker/cli/cli/trust"
16+
"github.com/docker/cli/internal/registryclient"
1717
"github.com/moby/moby/client"
1818
notaryclient "github.com/theupdateframework/notary/client"
1919
)

0 commit comments

Comments
 (0)