mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
registry: remove unused authConfig from Session
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
02ed265854
commit
541ed077a6
2 changed files with 4 additions and 7 deletions
|
@ -218,7 +218,7 @@ func (s *DefaultService) Search(ctx context.Context, term string, limit int, aut
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
r := newSession(client, authConfig, endpoint)
|
r := newSession(client, endpoint)
|
||||||
|
|
||||||
if index.Official {
|
if index.Official {
|
||||||
// If pull "library/foo", it's stored locally under "foo"
|
// If pull "library/foo", it's stored locally under "foo"
|
||||||
|
|
|
@ -25,9 +25,7 @@ import (
|
||||||
type Session struct {
|
type Session struct {
|
||||||
indexEndpoint *V1Endpoint
|
indexEndpoint *V1Endpoint
|
||||||
client *http.Client
|
client *http.Client
|
||||||
// TODO(tiborvass): remove authConfig
|
id string
|
||||||
authConfig *types.AuthConfig
|
|
||||||
id string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type authTransport struct {
|
type authTransport struct {
|
||||||
|
@ -178,9 +176,8 @@ func authorizeClient(client *http.Client, authConfig *types.AuthConfig, endpoint
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func newSession(client *http.Client, authConfig *types.AuthConfig, endpoint *V1Endpoint) *Session {
|
func newSession(client *http.Client, endpoint *V1Endpoint) *Session {
|
||||||
return &Session{
|
return &Session{
|
||||||
authConfig: authConfig,
|
|
||||||
client: client,
|
client: client,
|
||||||
indexEndpoint: endpoint,
|
indexEndpoint: endpoint,
|
||||||
id: stringid.GenerateRandomID(),
|
id: stringid.GenerateRandomID(),
|
||||||
|
@ -194,7 +191,7 @@ func NewSession(client *http.Client, authConfig *types.AuthConfig, endpoint *V1E
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return newSession(client, authConfig, endpoint), nil
|
return newSession(client, endpoint), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// SearchRepositories performs a search against the remote repository
|
// SearchRepositories performs a search against the remote repository
|
||||||
|
|
Loading…
Reference in a new issue