Ver Fonte

Merge pull request #21053 from WeiZhang555/vendor-engine-api

Vendor docker/engine-api
Brian Goff há 9 anos atrás
pai
commit
9bfdb93e3a

+ 1 - 1
hack/vendor.sh

@@ -24,7 +24,7 @@ clone git golang.org/x/net 47990a1ba55743e6ef1affd3a14e5bac8553615d https://gith
 clone git golang.org/x/sys eb2c74142fd19a79b3f237334c7384d5167b1b46 https://github.com/golang/sys.git
 clone git github.com/docker/go-units 651fc226e7441360384da338d0fd37f2440ffbe3
 clone git github.com/docker/go-connections v0.2.0
-clone git github.com/docker/engine-api 7f6071353fc48f69d2328c4ebe8f3bd0f7c75da4
+clone git github.com/docker/engine-api 9bab0d5b73872e53dfadfa055dcc519e57b09439
 clone git github.com/RackSec/srslog 6eb773f331e46fbba8eecb8e794e635e75fc04de
 clone git github.com/imdario/mergo 0.2.1
 

+ 0 - 2
vendor/src/github.com/docker/engine-api/client/client_nounix.go → vendor/src/github.com/docker/engine-api/client/client_darwin.go

@@ -1,5 +1,3 @@
-// +build windows darwin
-
 package client
 
 // DefaultDockerHost defines os specific default if DOCKER_HOST is unset

+ 4 - 0
vendor/src/github.com/docker/engine-api/client/client_windows.go

@@ -0,0 +1,4 @@
+package client
+
+// DefaultDockerHost defines os specific default if DOCKER_HOST is unset
+const DefaultDockerHost = "npipe:////./pipe/docker_engine"

+ 0 - 37
vendor/src/github.com/docker/engine-api/client/transport/client_mock.go

@@ -1,37 +0,0 @@
-// +build test
-
-package transport
-
-import (
-	"bytes"
-	"crypto/tls"
-	"io/ioutil"
-	"net/http"
-)
-
-type mockClient struct {
-	*tlsInfo
-	do func(*http.Request) (*http.Response, error)
-}
-
-// NewMockClient returns a mocked client that runs the function supplied as `client.Do` call
-func NewMockClient(tlsConfig *tls.Config, doer func(*http.Request) (*http.Response, error)) Client {
-	return mockClient{
-		tlsInfo: &tlsInfo{tlsConfig},
-		do:      doer,
-	}
-}
-
-// Do executes the supplied function for the mock.
-func (m mockClient) Do(req *http.Request) (*http.Response, error) {
-	return m.do(req)
-}
-
-func ErrorMock(statusCode int, message string) func(req *http.Request) (*http.Response, error) {
-	return func(req *http.Request) (*http.Response, error) {
-		return &http.Response{
-			StatusCode: statusCode,
-			Body:       ioutil.NopCloser(bytes.NewReader([]byte(message))),
-		}, nil
-	}
-}

+ 6 - 0
vendor/src/github.com/docker/engine-api/types/auth.go

@@ -12,5 +12,11 @@ type AuthConfig struct {
 	Email string `json:"email,omitempty"`
 
 	ServerAddress string `json:"serveraddress,omitempty"`
+
+	// IdentityToken is used to authenticate the user and get
+	// an access token for the registry.
+	IdentityToken string `json:"identitytoken,omitempty"`
+
+	// RegistryToken is a bearer token to be sent to a registry
 	RegistryToken string `json:"registrytoken,omitempty"`
 }

+ 1 - 0
vendor/src/github.com/docker/engine-api/types/container/host_config.go

@@ -239,6 +239,7 @@ type HostConfig struct {
 	NetworkMode     NetworkMode   // Network mode to use for the container
 	PortBindings    nat.PortMap   // Port mapping between the exposed port (container) and the host
 	RestartPolicy   RestartPolicy // Restart policy to be used for the container
+	AutoRemove      bool          // Automatically remove container when it exits
 	VolumeDriver    string        // Name of the volume driver used to mount volumes
 	VolumesFrom     []string      // List of volumes to take from other container
 

+ 0 - 15
vendor/src/github.com/docker/engine-api/types/container/hostconfig_windows.go

@@ -1,7 +1,6 @@
 package container
 
 import (
-	"fmt"
 	"strings"
 )
 
@@ -79,20 +78,6 @@ func (n NetworkMode) NetworkName() string {
 	return ""
 }
 
-// ValidateIsolation performs platform specific validation of the
-// isolation technology in the hostconfig structure. Windows supports 'default' (or
-// blank), 'process', or 'hyperv'.
-func ValidateIsolation(hc *HostConfig) error {
-	// We may not be passed a host config, such as in the case of docker commit
-	if hc == nil {
-		return nil
-	}
-	if !hc.Isolation.IsValid() {
-		return fmt.Errorf("invalid --isolation: %q. Windows supports 'default', 'process', or 'hyperv'", hc.Isolation)
-	}
-	return nil
-}
-
 //UserDefined indicates user-created network
 func (n NetworkMode) UserDefined() string {
 	if n.IsUserDefined() {

+ 2 - 2
vendor/src/github.com/docker/engine-api/types/network/network.go

@@ -46,7 +46,7 @@ type EndpointSettings struct {
 }
 
 // NetworkingConfig represents the container's networking configuration for each of its interfaces
-// Carries the networink configs specified in the `docker run` and `docker network connect` commands
+// Carries the networking configs specified in the `docker run` and `docker network connect` commands
 type NetworkingConfig struct {
-	EndpointsConfig map[string]*EndpointSettings // Endpoint configs for each conencting network
+	EndpointsConfig map[string]*EndpointSettings // Endpoint configs for each connecting network
 }

+ 4 - 0
vendor/src/github.com/docker/engine-api/types/types.go

@@ -39,6 +39,10 @@ type ContainerUpdateResponse struct {
 type AuthResponse struct {
 	// Status is the authentication status
 	Status string `json:"Status"`
+
+	// IdentityToken is an opaque token used for authenticating
+	// a user after a successful login.
+	IdentityToken string `json:"IdentityToken,omitempty"`
 }
 
 // ContainerWaitResponse contains response of Remote API: