2015-03-25 13:34:41 -04:00
// Package client provides a command-line interface for Docker.
//
// Run "docker help SUBCOMMAND" or "docker SUBCOMMAND --help" to see more information on any Docker subcommand, including the full list of options supported for the subcommand.
// See https://docs.docker.com/installation/ for instructions on installing Docker.
package client
2015-12-04 17:02:06 -05:00
import (
"io"
2015-12-06 15:17:34 -05:00
"github.com/docker/docker/api/client/lib"
2015-12-04 17:02:06 -05:00
"github.com/docker/docker/api/types"
2015-12-18 13:36:17 -05:00
"github.com/docker/docker/api/types/container"
2015-12-15 16:40:11 -05:00
"github.com/docker/docker/api/types/filters"
2015-12-15 11:44:20 -05:00
"github.com/docker/docker/api/types/registry"
2015-12-04 17:02:06 -05:00
)
// apiClient is an interface that clients that talk with a docker server must implement.
type apiClient interface {
2015-08-31 17:45:27 -04:00
ClientVersion ( ) string
2015-12-06 00:33:38 -05:00
ContainerAttach ( options types . ContainerAttachOptions ) ( types . HijackedResponse , error )
2015-12-04 17:02:06 -05:00
ContainerCommit ( options types . ContainerCommitOptions ) ( types . ContainerCommitResponse , error )
2015-12-18 13:36:17 -05:00
ContainerCreate ( config * container . Config , hostConfig * container . HostConfig , containerName string ) ( types . ContainerCreateResponse , error )
2015-12-04 17:02:06 -05:00
ContainerDiff ( containerID string ) ( [ ] types . ContainerChange , error )
2015-12-18 13:17:54 -05:00
ContainerExecAttach ( execID string , config types . ExecConfig ) ( types . HijackedResponse , error )
ContainerExecCreate ( config types . ExecConfig ) ( types . ContainerExecCreateResponse , error )
2015-12-06 00:33:38 -05:00
ContainerExecInspect ( execID string ) ( types . ContainerExecInspect , error )
2015-12-06 18:41:57 -05:00
ContainerExecResize ( options types . ResizeOptions ) error
2015-12-06 00:33:38 -05:00
ContainerExecStart ( execID string , config types . ExecStartCheck ) error
2015-12-04 17:02:06 -05:00
ContainerExport ( containerID string ) ( io . ReadCloser , error )
ContainerInspect ( containerID string ) ( types . ContainerJSON , error )
2015-12-06 18:34:25 -05:00
ContainerInspectWithRaw ( containerID string , getSize bool ) ( types . ContainerJSON , [ ] byte , error )
2015-12-04 17:02:06 -05:00
ContainerKill ( containerID , signal string ) error
ContainerList ( options types . ContainerListOptions ) ( [ ] types . Container , error )
ContainerLogs ( options types . ContainerLogsOptions ) ( io . ReadCloser , error )
ContainerPause ( containerID string ) error
ContainerRemove ( options types . ContainerRemoveOptions ) error
ContainerRename ( containerID , newContainerName string ) error
2015-12-06 18:41:57 -05:00
ContainerResize ( options types . ResizeOptions ) error
2015-12-04 17:02:06 -05:00
ContainerRestart ( containerID string , timeout int ) error
ContainerStatPath ( containerID , path string ) ( types . ContainerPathStat , error )
2015-12-06 02:34:23 -05:00
ContainerStats ( containerID string , stream bool ) ( io . ReadCloser , error )
2015-12-05 22:53:52 -05:00
ContainerStart ( containerID string ) error
2015-12-04 17:02:06 -05:00
ContainerStop ( containerID string , timeout int ) error
ContainerTop ( containerID string , arguments [ ] string ) ( types . ContainerProcessList , error )
ContainerUnpause ( containerID string ) error
2015-12-28 06:19:26 -05:00
ContainerUpdate ( containerID string , hostConfig container . HostConfig ) error
2015-12-04 17:02:06 -05:00
ContainerWait ( containerID string ) ( int , error )
CopyFromContainer ( containerID , srcPath string ) ( io . ReadCloser , types . ContainerPathStat , error )
CopyToContainer ( options types . CopyToContainerOptions ) error
Events ( options types . EventsOptions ) ( io . ReadCloser , error )
ImageBuild ( options types . ImageBuildOptions ) ( types . ImageBuildResponse , error )
ImageCreate ( options types . ImageCreateOptions ) ( io . ReadCloser , error )
ImageHistory ( imageID string ) ( [ ] types . ImageHistory , error )
ImageImport ( options types . ImageImportOptions ) ( io . ReadCloser , error )
2015-12-06 18:34:25 -05:00
ImageInspectWithRaw ( imageID string , getSize bool ) ( types . ImageInspect , [ ] byte , error )
2015-12-04 17:02:06 -05:00
ImageList ( options types . ImageListOptions ) ( [ ] types . Image , error )
2015-12-22 19:00:27 -05:00
ImageLoad ( input io . Reader ) ( types . ImageLoadResponse , error )
2015-12-06 15:17:34 -05:00
ImagePull ( options types . ImagePullOptions , privilegeFunc lib . RequestPrivilegeFunc ) ( io . ReadCloser , error )
2015-12-06 15:37:54 -05:00
ImagePush ( options types . ImagePushOptions , privilegeFunc lib . RequestPrivilegeFunc ) ( io . ReadCloser , error )
2015-12-04 17:02:06 -05:00
ImageRemove ( options types . ImageRemoveOptions ) ( [ ] types . ImageDelete , error )
2015-12-06 19:29:15 -05:00
ImageSearch ( options types . ImageSearchOptions , privilegeFunc lib . RequestPrivilegeFunc ) ( [ ] registry . SearchResult , error )
2015-12-04 17:02:06 -05:00
ImageSave ( imageIDs [ ] string ) ( io . ReadCloser , error )
ImageTag ( options types . ImageTagOptions ) error
Info ( ) ( types . Info , error )
NetworkConnect ( networkID , containerID string ) error
NetworkCreate ( options types . NetworkCreate ) ( types . NetworkCreateResponse , error )
NetworkDisconnect ( networkID , containerID string ) error
NetworkInspect ( networkID string ) ( types . NetworkResource , error )
2015-11-10 03:57:06 -05:00
NetworkList ( options types . NetworkListOptions ) ( [ ] types . NetworkResource , error )
2015-12-04 17:02:06 -05:00
NetworkRemove ( networkID string ) error
2015-12-11 23:11:42 -05:00
RegistryLogin ( auth types . AuthConfig ) ( types . AuthResponse , error )
2015-12-11 18:58:54 -05:00
ServerVersion ( ) ( types . Version , error )
2015-12-04 17:02:06 -05:00
VolumeCreate ( options types . VolumeCreateRequest ) ( types . Volume , error )
VolumeInspect ( volumeID string ) ( types . Volume , error )
VolumeList ( filter filters . Args ) ( types . VolumesListResponse , error )
VolumeRemove ( volumeID string ) error
}