remove schema if requiredss and add Check SSL

Signed-off-by: zhuxiaoyang <sunzhu@yunify.com>
This commit is contained in:
zhuxiaoyang
2019-12-03 15:39:41 +08:00
parent 6db3a0ba3e
commit 444e24bd48
7 changed files with 147 additions and 15 deletions

View File

@@ -64,7 +64,7 @@ type authService struct {
Scope []string
}
func CreateRegistryClient(username, password, domain string) (*Registry, error) {
func CreateRegistryClient(username, password, domain string, useSSL bool) (*Registry, error) {
authDomain := domain
auth, err := GetAuthConfig(username, password, authDomain)
if err != nil {
@@ -75,6 +75,7 @@ func CreateRegistryClient(username, password, domain string) (*Registry, error)
// Create the registry client.
return New(auth, RegistryOpt{
Domain: domain,
UseSSL: useSSL,
})
}