Refactor PullImage RemoveImage methods

Refactor image remove
This commit is contained in:
Harry Zhang
2016-04-06 11:06:37 -04:00
parent 3918eee5bf
commit a3939473d3
12 changed files with 61 additions and 79 deletions

View File

@@ -22,7 +22,7 @@ import (
"sync"
"time"
docker "github.com/fsouza/go-dockerclient"
dockertypes "github.com/docker/engine-api/types"
"github.com/golang/glog"
)
@@ -36,12 +36,12 @@ type DockerConfigProvider interface {
LazyProvide() *DockerConfigEntry
}
func LazyProvide(creds LazyAuthConfiguration) docker.AuthConfiguration {
func LazyProvide(creds LazyAuthConfiguration) dockertypes.AuthConfig {
if creds.Provider != nil {
entry := *creds.Provider.LazyProvide()
return DockerConfigEntryToLazyAuthConfiguration(entry).AuthConfiguration
return DockerConfigEntryToLazyAuthConfiguration(entry).AuthConfig
} else {
return creds.AuthConfiguration
return creds.AuthConfig
}
}