cli/registry/client: deprecate and move internal

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-08-19 14:57:00 +02:00
parent c2a042e0ed
commit 13010ba673
8 changed files with 29 additions and 8 deletions

View File

@ -9,7 +9,7 @@ import (
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/config"
"github.com/docker/cli/cli/manifest/store"
registryclient "github.com/docker/cli/cli/registry/client"
"github.com/docker/cli/internal/registryclient"
"github.com/moby/moby/api/types/registry"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/spf13/cobra"

View File

@ -5,7 +5,7 @@ import (
"github.com/distribution/reference"
manifesttypes "github.com/docker/cli/cli/manifest/types"
"github.com/docker/cli/cli/registry/client"
"github.com/docker/cli/internal/registryclient"
"github.com/docker/distribution"
"github.com/opencontainers/go-digest"
)
@ -45,4 +45,4 @@ func (c *fakeRegistryClient) PutManifest(ctx context.Context, ref reference.Name
return digest.Digest(""), nil
}
var _ client.RegistryClient = &fakeRegistryClient{}
var _ registryclient.RegistryClient = &fakeRegistryClient{}

View File

@ -10,7 +10,7 @@ import (
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/manifest/types"
registryclient "github.com/docker/cli/cli/registry/client"
"github.com/docker/cli/internal/registryclient"
"github.com/docker/distribution"
"github.com/docker/distribution/manifest/manifestlist"
"github.com/docker/distribution/manifest/ocischema"

View File

@ -0,0 +1,21 @@
package client // Deprecated: this package was only used internally and will be removed in the next release.
import "github.com/docker/cli/internal/registryclient"
// RegistryClient is a client used to communicate with a Docker distribution
// registry.
//
// Deprecated: this interface was only used internally and will be removed in the next release.
type RegistryClient = registryclient.RegistryClient
// NewRegistryClient returns a new RegistryClient with a resolver
//
// Deprecated: this function was only used internally and will be removed in the next release.
func NewRegistryClient(resolver registryclient.AuthConfigResolver, userAgent string, insecure bool) registryclient.RegistryClient {
return registryclient.NewRegistryClient(resolver, userAgent, insecure)
}
// AuthConfigResolver returns Auth Configuration for an index
//
// Deprecated: this type was only used internally and will be removed in the next release.
type AuthConfigResolver = registryclient.AuthConfigResolver

View File

@ -1,4 +1,4 @@
package client
package registryclient
import (
"context"

View File

@ -1,4 +1,4 @@
package client
package registryclient
import (
"context"

View File

@ -1,4 +1,4 @@
package client
package registryclient
import (
"context"

View File

@ -11,9 +11,9 @@ import (
"github.com/docker/cli/cli/context/docker"
"github.com/docker/cli/cli/context/store"
manifeststore "github.com/docker/cli/cli/manifest/store"
registryclient "github.com/docker/cli/cli/registry/client"
"github.com/docker/cli/cli/streams"
"github.com/docker/cli/cli/trust"
"github.com/docker/cli/internal/registryclient"
"github.com/moby/moby/client"
notaryclient "github.com/theupdateframework/notary/client"
)