@@ -7,25 +7,45 @@ import (
7
7
)
8
8
9
9
type Registry struct {
10
- Id string `json:"_id,omitempty"`
11
- Name string `json:"name,omitempty"`
12
- Kind string `json:"kind,omitempty"`
13
- Provider string `json:"provider,omitempty"`
14
- Domain string `json:"domain,omitempty"`
15
- Username string `json:"username,omitempty"`
16
- Password string `json:"password,omitempty"`
17
- Default bool `json:"default,omitempty"`
18
- Primary bool `json:"primary,omitempty"`
19
- BehindFirewall bool `json:"behindFirewall,omitempty"`
20
- DenyCompositeDomain bool `json:"denyCompositeDomain,omitempty"`
10
+ // common
11
+ Id string `json:"_id,omitempty"`
12
+ Name string `json:"name,omitempty"`
13
+ Kind string `json:"kind,omitempty"`
14
+ Default bool `json:"default,omitempty"`
15
+ Primary bool `json:"primary,omitempty"`
16
+ BehindFirewall bool `json:"behindFirewall,omitempty"`
17
+ FallbackRegistry string `json:"fallbackRegistry,omitempty"`
18
+ RepositoryPrefix string `json:"repositoryPrefix,omitempty"`
19
+ Provider string `json:"provider,omitempty"`
20
+
21
+ // mostly all
22
+ Domain string `json:"domain,omitempty"`
23
+ Username string `json:"username,omitempty"`
24
+ Password string `json:"password,omitempty"`
25
+
26
+ // bintray
27
+ Token string `json:"token,omitempty"`
28
+
29
+ // ecr
30
+ AccessKeyId string `json:"accessKeyId,omitempty"`
31
+ SecretAccessKey string `json:"secretAccessKey,omitempty"`
32
+ Region string `json:"region,omitempty"`
33
+
34
+ // gcr, gar
35
+ Keyfile string `json:"keyfile,omitempty"`
36
+
37
+ // acr
38
+ ClientId string `json:"clientId,omitempty"`
39
+ ClientSecret string `json:"clientSecret,omitempty"`
40
+ //DenyCompositeDomain bool `json:"denyCompositeDomain,omitempty"`
21
41
}
22
42
23
43
func (registry * Registry ) GetID () string {
24
44
return registry .Id
25
45
}
26
46
27
47
func (client * Client ) GetRegistry (name string ) (* Registry , error ) {
28
- fullPath := fmt .Sprintf ("/registries/%s" , url .PathEscape (name ))
48
+ fullPath := fmt .Sprintf ("/registries/%s?includePrivate=true " , url .PathEscape (name ))
29
49
opts := RequestOptions {
30
50
Path : fullPath ,
31
51
Method : "GET" ,
0 commit comments