File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package types // import "github.com/docker/docker/api/types"
2+ import "github.com/docker/docker/api/types/registry"
23
3- // AuthConfig contains authorization information for connecting to a Registry
4- type AuthConfig struct {
5- Username string `json:"username,omitempty"`
6- Password string `json:"password,omitempty"`
7- Auth string `json:"auth,omitempty"`
8-
9- // Email is an optional value associated with the username.
10- // This field is deprecated and will be removed in a later
11- // version of docker.
12- Email string `json:"email,omitempty"`
13-
14- ServerAddress string `json:"serveraddress,omitempty"`
15-
16- // IdentityToken is used to authenticate the user and get
17- // an access token for the registry.
18- IdentityToken string `json:"identitytoken,omitempty"`
19-
20- // RegistryToken is a bearer token to be sent to a registry
21- RegistryToken string `json:"registrytoken,omitempty"`
22- }
4+ // AuthConfig contains authorization information for connecting to a Registry.
5+ //
6+ // Deprecated: use github.com/docker/docker/api/types/registry.AuthConfig
7+ type AuthConfig = registry.AuthConfig
Original file line number Diff line number Diff line change 44 "io"
55
66 "github.com/docker/docker/api/types"
7+ "github.com/docker/docker/api/types/registry"
78 "github.com/docker/docker/pkg/streamformatter"
89 specs "github.com/opencontainers/image-spec/specs-go/v1"
910)
@@ -39,7 +40,7 @@ type BuildConfig struct {
3940// GetImageAndLayerOptions are the options supported by GetImageAndReleasableLayer
4041type GetImageAndLayerOptions struct {
4142 PullOption PullOption
42- AuthConfig map [string ]types .AuthConfig
43+ AuthConfig map [string ]registry .AuthConfig
4344 Output io.Writer
4445 Platform * specs.Platform
4546}
Original file line number Diff line number Diff line change 77
88 "github.com/docker/docker/api/types/container"
99 "github.com/docker/docker/api/types/filters"
10+ "github.com/docker/docker/api/types/registry"
1011 units "github.com/docker/go-units"
1112)
1213
@@ -180,7 +181,7 @@ type ImageBuildOptions struct {
180181 // at all (nil). See the parsing of buildArgs in
181182 // api/server/router/build/build_routes.go for even more info.
182183 BuildArgs map [string ]* string
183- AuthConfigs map [string ]AuthConfig
184+ AuthConfigs map [string ]registry. AuthConfig
184185 Context io.Reader
185186 Labels map [string ]string
186187 // squash the resulting image's layers to the parent
Original file line number Diff line number Diff line change @@ -3,3 +3,24 @@ package registry // import "github.com/docker/docker/api/types/registry"
33// AuthHeader is the name of the header used to send encoded registry
44// authorization credentials for registry operations (push/pull).
55const AuthHeader = "X-Registry-Auth"
6+
7+ // AuthConfig contains authorization information for connecting to a Registry.
8+ type AuthConfig struct {
9+ Username string `json:"username,omitempty"`
10+ Password string `json:"password,omitempty"`
11+ Auth string `json:"auth,omitempty"`
12+
13+ // Email is an optional value associated with the username.
14+ // This field is deprecated and will be removed in a later
15+ // version of docker.
16+ Email string `json:"email,omitempty"`
17+
18+ ServerAddress string `json:"serveraddress,omitempty"`
19+
20+ // IdentityToken is used to authenticate the user and get
21+ // an access token for the registry.
22+ IdentityToken string `json:"identitytoken,omitempty"`
23+
24+ // RegistryToken is a bearer token to be sent to a registry
25+ RegistryToken string `json:"registrytoken,omitempty"`
26+ }
You can’t perform that action at this time.
0 commit comments