feat: harbor 支持 v1 版本

This commit is contained in:
wangzhengkun
2022-01-20 14:57:49 +08:00
parent 8437198e55
commit dcd2ee312d
8 changed files with 106 additions and 37 deletions

View File

@@ -13,7 +13,7 @@ func NewClient(config Config) RepoClient {
case "Nexus":
return repos.NewNexusClient(config.EndPoint, config.Credential.Username, config.Credential.Password)
case "Harbor":
return repos.NewHarborClient(config.EndPoint, config.Credential.Username, config.Credential.Password)
return repos.NewHarborClient(config.EndPoint, config.Credential.Username, config.Credential.Password, config.Version)
case "DockerRegistry":
return repos.NewDockerRegistryClient(config.EndPoint, config.Credential.Username, config.Credential.Password)
}
@@ -25,6 +25,7 @@ type Config struct {
EndPoint string
//DownloadUrl string
Credential Credential
Version string
}
type Credential struct {