github.com/walkingsparrow/docker@v1.4.2-0.20151218153551-b708a2249bfa/api/client/client.go (about)

     1  // Package client provides a command-line interface for Docker.
     2  //
     3  // 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.
     4  // See https://docs.docker.com/installation/ for instructions on installing Docker.
     5  package client
     6  
     7  import (
     8  	"io"
     9  
    10  	"github.com/docker/docker/api/client/lib"
    11  	"github.com/docker/docker/api/types"
    12  	"github.com/docker/docker/api/types/filters"
    13  	"github.com/docker/docker/api/types/registry"
    14  	"github.com/docker/docker/runconfig"
    15  )
    16  
    17  // apiClient is an interface that clients that talk with a docker server must implement.
    18  type apiClient interface {
    19  	ClientVersion() string
    20  	ContainerAttach(options types.ContainerAttachOptions) (types.HijackedResponse, error)
    21  	ContainerCommit(options types.ContainerCommitOptions) (types.ContainerCommitResponse, error)
    22  	ContainerCreate(config *runconfig.ContainerConfigWrapper, containerName string) (types.ContainerCreateResponse, error)
    23  	ContainerDiff(containerID string) ([]types.ContainerChange, error)
    24  	ContainerExecAttach(execID string, config runconfig.ExecConfig) (types.HijackedResponse, error)
    25  	ContainerExecCreate(config runconfig.ExecConfig) (types.ContainerExecCreateResponse, error)
    26  	ContainerExecInspect(execID string) (types.ContainerExecInspect, error)
    27  	ContainerExecResize(options types.ResizeOptions) error
    28  	ContainerExecStart(execID string, config types.ExecStartCheck) error
    29  	ContainerExport(containerID string) (io.ReadCloser, error)
    30  	ContainerInspect(containerID string) (types.ContainerJSON, error)
    31  	ContainerInspectWithRaw(containerID string, getSize bool) (types.ContainerJSON, []byte, error)
    32  	ContainerKill(containerID, signal string) error
    33  	ContainerList(options types.ContainerListOptions) ([]types.Container, error)
    34  	ContainerLogs(options types.ContainerLogsOptions) (io.ReadCloser, error)
    35  	ContainerPause(containerID string) error
    36  	ContainerRemove(options types.ContainerRemoveOptions) error
    37  	ContainerRename(containerID, newContainerName string) error
    38  	ContainerResize(options types.ResizeOptions) error
    39  	ContainerRestart(containerID string, timeout int) error
    40  	ContainerStatPath(containerID, path string) (types.ContainerPathStat, error)
    41  	ContainerStats(containerID string, stream bool) (io.ReadCloser, error)
    42  	ContainerStart(containerID string) error
    43  	ContainerStop(containerID string, timeout int) error
    44  	ContainerTop(containerID string, arguments []string) (types.ContainerProcessList, error)
    45  	ContainerUnpause(containerID string) error
    46  	ContainerWait(containerID string) (int, error)
    47  	CopyFromContainer(containerID, srcPath string) (io.ReadCloser, types.ContainerPathStat, error)
    48  	CopyToContainer(options types.CopyToContainerOptions) error
    49  	Events(options types.EventsOptions) (io.ReadCloser, error)
    50  	ImageBuild(options types.ImageBuildOptions) (types.ImageBuildResponse, error)
    51  	ImageCreate(options types.ImageCreateOptions) (io.ReadCloser, error)
    52  	ImageHistory(imageID string) ([]types.ImageHistory, error)
    53  	ImageImport(options types.ImageImportOptions) (io.ReadCloser, error)
    54  	ImageInspectWithRaw(imageID string, getSize bool) (types.ImageInspect, []byte, error)
    55  	ImageList(options types.ImageListOptions) ([]types.Image, error)
    56  	ImageLoad(input io.Reader) (io.ReadCloser, error)
    57  	ImagePull(options types.ImagePullOptions, privilegeFunc lib.RequestPrivilegeFunc) (io.ReadCloser, error)
    58  	ImagePush(options types.ImagePushOptions, privilegeFunc lib.RequestPrivilegeFunc) (io.ReadCloser, error)
    59  	ImageRemove(options types.ImageRemoveOptions) ([]types.ImageDelete, error)
    60  	ImageSearch(options types.ImageSearchOptions, privilegeFunc lib.RequestPrivilegeFunc) ([]registry.SearchResult, error)
    61  	ImageSave(imageIDs []string) (io.ReadCloser, error)
    62  	ImageTag(options types.ImageTagOptions) error
    63  	Info() (types.Info, error)
    64  	NetworkConnect(networkID, containerID string) error
    65  	NetworkCreate(options types.NetworkCreate) (types.NetworkCreateResponse, error)
    66  	NetworkDisconnect(networkID, containerID string) error
    67  	NetworkInspect(networkID string) (types.NetworkResource, error)
    68  	NetworkList() ([]types.NetworkResource, error)
    69  	NetworkRemove(networkID string) error
    70  	RegistryLogin(auth types.AuthConfig) (types.AuthResponse, error)
    71  	ServerVersion() (types.Version, error)
    72  	VolumeCreate(options types.VolumeCreateRequest) (types.Volume, error)
    73  	VolumeInspect(volumeID string) (types.Volume, error)
    74  	VolumeList(filter filters.Args) (types.VolumesListResponse, error)
    75  	VolumeRemove(volumeID string) error
    76  }