@@ -28,7 +28,7 @@ import (
2828 "github.com/docker/distribution/registry/api/errcode"
2929 "github.com/docker/distribution/registry/client/auth"
3030 "github.com/docker/distribution/registry/client/transport"
31- "github.com/docker/docker/api/types"
31+ apiregistry "github.com/docker/docker/api/types/registry "
3232 "github.com/docker/docker/errdefs"
3333 "github.com/docker/docker/registry"
3434 "github.com/docker/go-connections/tlsconfig"
@@ -41,7 +41,7 @@ import (
4141// They are not exposed in the docker/registry package that's why they are copied here
4242
4343type loginCredentialStore struct {
44- authConfig * types .AuthConfig
44+ authConfig * apiregistry .AuthConfig
4545}
4646
4747func (lcs loginCredentialStore ) Basic (* url.URL ) (string , string ) {
@@ -59,7 +59,7 @@ func (lcs loginCredentialStore) SetRefreshToken(u *url.URL, service, token strin
5959// loginWithTLS tries to login to the v2 registry server.
6060// A custom tls.Config is used to override the default TLS configuration of the different registry endpoints.
6161// The tls.Config is created using the provided certificate, certificate key and certificate authority.
62- func (c * Client ) loginWithTLS (ctx context.Context , service * registry.Service , certFile , keyFile , caFile string , authConfig * types .AuthConfig , userAgent string ) (string , string , error ) {
62+ func (c * Client ) loginWithTLS (ctx context.Context , service * registry.Service , certFile , keyFile , caFile string , authConfig * apiregistry .AuthConfig , userAgent string ) (string , string , error ) {
6363 tlsConfig , err := tlsconfig .Client (tlsconfig.Options {CAFile : caFile , CertFile : certFile , KeyFile : keyFile })
6464 if err != nil {
6565 return "" , "" , err
@@ -119,7 +119,7 @@ func (c *Client) getEndpoints(address string, service *registry.Service) ([]regi
119119// loginV2 tries to login to the v2 registry server. The given registry
120120// endpoint will be pinged to get authorization challenges. These challenges
121121// will be used to authenticate against the registry to validate credentials.
122- func loginV2 (authConfig * types .AuthConfig , endpoint registry.APIEndpoint , userAgent string ) (string , string , error ) {
122+ func loginV2 (authConfig * apiregistry .AuthConfig , endpoint registry.APIEndpoint , userAgent string ) (string , string , error ) {
123123 var (
124124 endpointStr = strings .TrimRight (endpoint .URL .String (), "/" ) + "/v2/"
125125 modifiers = registry .Headers (userAgent , nil )
0 commit comments