feat: 增加docker-registry支持

This commit is contained in:
wangzhengkun
2021-11-18 17:27:26 +08:00
parent 7874ed3d5c
commit d42fcbc569
4 changed files with 122 additions and 4 deletions

View File

@@ -14,19 +14,20 @@ func NewClient(config Config) RepoClient {
return repos.NewNexusClient(config.EndPoint, config.Credential.Username, config.Credential.Password)
case "Harbor":
return repos.NewHarborClient(config.EndPoint, config.Credential.Username, config.Credential.Password)
case "DockerRegistry":
return repos.NewDockerRegistryClient(config.EndPoint, config.Credential.Username, config.Credential.Password)
}
return nil
}
type Config struct {
Type string
EndPoint string
Type string
EndPoint string
//DownloadUrl string
Credential Credential
Credential Credential
}
type Credential struct {
Username string
Password string
}