Skip to content

Commit

Permalink
Modify import paths to point to the new engine-api package.
Browse files Browse the repository at this point in the history
Signed-off-by: David Calavera <david.calavera@gmail.com>
  • Loading branch information
calavera committed Jan 7, 2016
1 parent 9927e71 commit 907407d
Show file tree
Hide file tree
Showing 194 changed files with 304 additions and 304 deletions.
2 changes: 1 addition & 1 deletion api/client/attach.go
Expand Up @@ -5,10 +5,10 @@ import (
"io"

"github.com/Sirupsen/logrus"
"github.com/docker/docker/api/types"
Cli "github.com/docker/docker/cli"
flag "github.com/docker/docker/pkg/mflag"
"github.com/docker/docker/pkg/signal"
"github.com/docker/engine-api/types"
)

// CmdAttach attaches to a running container.
Expand Down
4 changes: 2 additions & 2 deletions api/client/build.go
Expand Up @@ -15,8 +15,6 @@ import (
"strings"

"github.com/docker/docker/api"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/builder/dockerignore"
Cli "github.com/docker/docker/cli"
"github.com/docker/docker/opts"
Expand All @@ -31,6 +29,8 @@ import (
"github.com/docker/docker/pkg/urlutil"
"github.com/docker/docker/reference"
runconfigopts "github.com/docker/docker/runconfig/opts"
"github.com/docker/engine-api/types"
"github.com/docker/engine-api/types/container"
"github.com/docker/go-units"
)

Expand Down
4 changes: 2 additions & 2 deletions api/client/cli.go
Expand Up @@ -9,12 +9,12 @@ import (
"runtime"

"github.com/docker/docker/api"
"github.com/docker/docker/api/client/lib"
"github.com/docker/docker/cli"
"github.com/docker/docker/cliconfig"
"github.com/docker/docker/dockerversion"
"github.com/docker/docker/opts"
"github.com/docker/docker/pkg/term"
"github.com/docker/engine-api/client"
"github.com/docker/go-connections/tlsconfig"
)

Expand Down Expand Up @@ -120,7 +120,7 @@ func NewDockerCli(in io.ReadCloser, out, err io.Writer, clientFlags *cli.ClientF
return err
}

client, err := lib.NewClient(host, verStr, clientTransport, customHeaders)
client, err := client.NewClient(host, verStr, clientTransport, customHeaders)
if err != nil {
return err
}
Expand Down
16 changes: 8 additions & 8 deletions api/client/client.go
Expand Up @@ -7,11 +7,11 @@ package client
import (
"io"

"github.com/docker/docker/api/client/lib"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/registry"
"github.com/docker/engine-api/client"
"github.com/docker/engine-api/types"
"github.com/docker/engine-api/types/container"
"github.com/docker/engine-api/types/filters"
"github.com/docker/engine-api/types/registry"
)

// apiClient is an interface that clients that talk with a docker server must implement.
Expand Down Expand Up @@ -55,10 +55,10 @@ type apiClient interface {
ImageInspectWithRaw(imageID string, getSize bool) (types.ImageInspect, []byte, error)
ImageList(options types.ImageListOptions) ([]types.Image, error)
ImageLoad(input io.Reader) (types.ImageLoadResponse, error)
ImagePull(options types.ImagePullOptions, privilegeFunc lib.RequestPrivilegeFunc) (io.ReadCloser, error)
ImagePush(options types.ImagePushOptions, privilegeFunc lib.RequestPrivilegeFunc) (io.ReadCloser, error)
ImagePull(options types.ImagePullOptions, privilegeFunc client.RequestPrivilegeFunc) (io.ReadCloser, error)
ImagePush(options types.ImagePushOptions, privilegeFunc client.RequestPrivilegeFunc) (io.ReadCloser, error)
ImageRemove(options types.ImageRemoveOptions) ([]types.ImageDelete, error)
ImageSearch(options types.ImageSearchOptions, privilegeFunc lib.RequestPrivilegeFunc) ([]registry.SearchResult, error)
ImageSearch(options types.ImageSearchOptions, privilegeFunc client.RequestPrivilegeFunc) ([]registry.SearchResult, error)
ImageSave(imageIDs []string) (io.ReadCloser, error)
ImageTag(options types.ImageTagOptions) error
Info() (types.Info, error)
Expand Down
4 changes: 2 additions & 2 deletions api/client/commit.go
Expand Up @@ -5,12 +5,12 @@ import (
"errors"
"fmt"

"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
Cli "github.com/docker/docker/cli"
"github.com/docker/docker/opts"
flag "github.com/docker/docker/pkg/mflag"
"github.com/docker/docker/reference"
"github.com/docker/engine-api/types"
"github.com/docker/engine-api/types/container"
)

// CmdCommit creates a new image from a container's changes.
Expand Down
2 changes: 1 addition & 1 deletion api/client/cp.go
Expand Up @@ -7,11 +7,11 @@ import (
"path/filepath"
"strings"

"github.com/docker/docker/api/types"
Cli "github.com/docker/docker/cli"
"github.com/docker/docker/pkg/archive"
flag "github.com/docker/docker/pkg/mflag"
"github.com/docker/docker/pkg/system"
"github.com/docker/engine-api/types"
)

type copyDirection int
Expand Down
8 changes: 4 additions & 4 deletions api/client/create.go
Expand Up @@ -5,14 +5,14 @@ import (
"io"
"os"

"github.com/docker/docker/api/client/lib"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
Cli "github.com/docker/docker/cli"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/docker/docker/reference"
"github.com/docker/docker/registry"
runconfigopts "github.com/docker/docker/runconfig/opts"
"github.com/docker/engine-api/client"
"github.com/docker/engine-api/types"
"github.com/docker/engine-api/types/container"
)

func (cli *DockerCli) pullImage(image string) error {
Expand Down Expand Up @@ -110,7 +110,7 @@ func (cli *DockerCli) createContainer(config *container.Config, hostConfig *cont
response, err := cli.client.ContainerCreate(config, hostConfig, name)
//if image not found try to pull it
if err != nil {
if lib.IsErrImageNotFound(err) {
if client.IsErrImageNotFound(err) {
fmt.Fprintf(cli.err, "Unable to find image '%s' locally\n", ref.String())

// we don't want to write to stdout anything apart from container.ID
Expand Down
6 changes: 3 additions & 3 deletions api/client/events.go
Expand Up @@ -7,13 +7,13 @@ import (
"strings"
"time"

"github.com/docker/docker/api/types"
eventtypes "github.com/docker/docker/api/types/events"
"github.com/docker/docker/api/types/filters"
Cli "github.com/docker/docker/cli"
"github.com/docker/docker/opts"
"github.com/docker/docker/pkg/jsonlog"
flag "github.com/docker/docker/pkg/mflag"
"github.com/docker/engine-api/types"
eventtypes "github.com/docker/engine-api/types/events"
"github.com/docker/engine-api/types/filters"
)

// CmdEvents prints a live stream of real time events from the server.
Expand Down
2 changes: 1 addition & 1 deletion api/client/exec.go
Expand Up @@ -5,10 +5,10 @@ import (
"io"

"github.com/Sirupsen/logrus"
"github.com/docker/docker/api/types"
Cli "github.com/docker/docker/cli"
flag "github.com/docker/docker/pkg/mflag"
"github.com/docker/docker/pkg/promise"
"github.com/docker/engine-api/types"
)

// CmdExec runs a command in a running container.
Expand Down
2 changes: 1 addition & 1 deletion api/client/exec_test.go
Expand Up @@ -5,8 +5,8 @@ import (
"io/ioutil"
"testing"

"github.com/docker/docker/api/types"
flag "github.com/docker/docker/pkg/mflag"
"github.com/docker/engine-api/types"
)

type arguments struct {
Expand Down
2 changes: 1 addition & 1 deletion api/client/formatter/custom.go
Expand Up @@ -7,9 +7,9 @@ import (
"time"

"github.com/docker/docker/api"
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/stringid"
"github.com/docker/docker/pkg/stringutils"
"github.com/docker/engine-api/types"
"github.com/docker/go-units"
)

Expand Down
2 changes: 1 addition & 1 deletion api/client/formatter/custom_test.go
Expand Up @@ -6,8 +6,8 @@ import (
"testing"
"time"

"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/stringid"
"github.com/docker/engine-api/types"
)

func TestContainerPsContext(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion api/client/formatter/formatter.go
Expand Up @@ -8,8 +8,8 @@ import (
"text/tabwriter"
"text/template"

"github.com/docker/docker/api/types"
"github.com/docker/docker/reference"
"github.com/docker/engine-api/types"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion api/client/formatter/formatter_test.go
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/docker/docker/api/types"
"github.com/docker/engine-api/types"
)

func TestContainerContextWrite(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion api/client/hijack.go
Expand Up @@ -5,9 +5,9 @@ import (
"os"

"github.com/Sirupsen/logrus"
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/stdcopy"
"github.com/docker/docker/pkg/term"
"github.com/docker/engine-api/types"
)

func (cli *DockerCli) holdHijackedConnection(setRawTerminal bool, inputStream io.ReadCloser, outputStream, errorStream io.Writer, resp types.HijackedResponse) error {
Expand Down
4 changes: 2 additions & 2 deletions api/client/images.go
Expand Up @@ -2,11 +2,11 @@ package client

import (
"github.com/docker/docker/api/client/formatter"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
Cli "github.com/docker/docker/cli"
"github.com/docker/docker/opts"
flag "github.com/docker/docker/pkg/mflag"
"github.com/docker/engine-api/types"
"github.com/docker/engine-api/types/filters"
)

// CmdImages lists the images in a specified repository, or all top-level images if no repository is specified.
Expand Down
2 changes: 1 addition & 1 deletion api/client/import.go
Expand Up @@ -5,13 +5,13 @@ import (
"io"
"os"

"github.com/docker/docker/api/types"
Cli "github.com/docker/docker/cli"
"github.com/docker/docker/opts"
"github.com/docker/docker/pkg/jsonmessage"
flag "github.com/docker/docker/pkg/mflag"
"github.com/docker/docker/pkg/urlutil"
"github.com/docker/docker/reference"
"github.com/docker/engine-api/types"
)

// CmdImport creates an empty filesystem image, imports the contents of the tarball into the image, and optionally tags the image.
Expand Down
6 changes: 3 additions & 3 deletions api/client/inspect.go
Expand Up @@ -6,9 +6,9 @@ import (
"text/template"

"github.com/docker/docker/api/client/inspect"
"github.com/docker/docker/api/client/lib"
Cli "github.com/docker/docker/cli"
flag "github.com/docker/docker/pkg/mflag"
"github.com/docker/engine-api/client"
)

var funcMap = template.FuncMap{
Expand Down Expand Up @@ -64,10 +64,10 @@ func (cli *DockerCli) inspectAll(getSize bool) inspectSearcher {
c, rawContainer, err := cli.client.ContainerInspectWithRaw(ref, getSize)
if err != nil {
// Search for image with that id if a container doesn't exist.
if lib.IsErrContainerNotFound(err) {
if client.IsErrContainerNotFound(err) {
i, rawImage, err := cli.client.ImageInspectWithRaw(ref, getSize)
if err != nil {
if lib.IsErrImageNotFound(err) {
if client.IsErrImageNotFound(err) {
return nil, nil, fmt.Errorf("Error: No such image or container: %s", ref)
}
return nil, nil, err
Expand Down
2 changes: 1 addition & 1 deletion api/client/lib/container_attach.go
Expand Up @@ -3,7 +3,7 @@ package lib
import (
"net/url"

"github.com/docker/docker/api/types"
"github.com/docker/engine-api/types"
)

// ContainerAttach attaches a connection to a container in the server.
Expand Down
2 changes: 1 addition & 1 deletion api/client/lib/container_commit.go
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"net/url"

"github.com/docker/docker/api/types"
"github.com/docker/engine-api/types"
)

// ContainerCommit applies changes into a container and creates a new tagged image.
Expand Down
4 changes: 2 additions & 2 deletions api/client/lib/container_create.go
Expand Up @@ -5,8 +5,8 @@ import (
"net/url"
"strings"

"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/engine-api/types"
"github.com/docker/engine-api/types/container"
)

type configWrapper struct {
Expand Down
2 changes: 1 addition & 1 deletion api/client/lib/container_inspect.go
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"net/url"

"github.com/docker/docker/api/types"
"github.com/docker/engine-api/types"
)

// ContainerInspect returns the container information.
Expand Down
4 changes: 2 additions & 2 deletions api/client/lib/container_list.go
Expand Up @@ -5,8 +5,8 @@ import (
"net/url"
"strconv"

"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/engine-api/types"
"github.com/docker/engine-api/types/filters"
)

// ContainerList returns the list of containers in the docker host.
Expand Down
2 changes: 1 addition & 1 deletion api/client/lib/container_remove.go
Expand Up @@ -3,7 +3,7 @@ package lib
import (
"net/url"

"github.com/docker/docker/api/types"
"github.com/docker/engine-api/types"
)

// ContainerRemove kills and removes a container from the docker host.
Expand Down
2 changes: 1 addition & 1 deletion api/client/lib/container_top.go
Expand Up @@ -5,7 +5,7 @@ import (
"net/url"
"strings"

"github.com/docker/docker/api/types"
"github.com/docker/engine-api/types"
)

// ContainerTop shows process information from within a container.
Expand Down
2 changes: 1 addition & 1 deletion api/client/lib/container_update.go
@@ -1,7 +1,7 @@
package lib

import (
"github.com/docker/docker/api/types/container"
"github.com/docker/engine-api/types/container"
)

// ContainerUpdate updates resources of a container
Expand Down
2 changes: 1 addition & 1 deletion api/client/lib/copy.go
Expand Up @@ -10,7 +10,7 @@ import (
"path/filepath"
"strings"

"github.com/docker/docker/api/types"
"github.com/docker/engine-api/types"
)

// ContainerStatPath returns Stat information about a path inside the container filesystem.
Expand Down
2 changes: 1 addition & 1 deletion api/client/lib/diff.go
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"net/url"

"github.com/docker/docker/api/types"
"github.com/docker/engine-api/types"
)

// ContainerDiff shows differences in a container filesystem since it was started.
Expand Down
6 changes: 3 additions & 3 deletions api/client/lib/events.go
Expand Up @@ -5,9 +5,9 @@ import (
"net/url"
"time"

"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
timetypes "github.com/docker/docker/api/types/time"
"github.com/docker/engine-api/types"
"github.com/docker/engine-api/types/filters"
timetypes "github.com/docker/engine-api/types/time"
)

// Events returns a stream of events in the daemon in a ReadCloser.
Expand Down
2 changes: 1 addition & 1 deletion api/client/lib/exec.go
Expand Up @@ -3,7 +3,7 @@ package lib
import (
"encoding/json"

"github.com/docker/docker/api/types"
"github.com/docker/engine-api/types"
)

// ContainerExecCreate creates a new exec configuration to run an exec process.
Expand Down

0 comments on commit 907407d

Please sign in to comment.