Versions in this module Expand all Collapse all v0 v0.1.1 Jan 28, 2023 v0.1.0 Jan 28, 2023 Changes in this version + const DefaultDockerHost — darwin/amd64, linux/amd64, windows/amd64 + const DefaultVersion + var ErrConnectionFailed = errors.New(...) + func ErrorConnectionFailed(host string) error + func IsErrContainerNotFound(err error) bool + func IsErrImageNotFound(err error) bool + func IsErrNetworkNotFound(err error) bool + func IsErrNodeNotFound(err error) bool + func IsErrNotFound(err error) bool + func IsErrPluginPermissionDenied(err error) bool + func IsErrServiceNotFound(err error) bool + func IsErrTaskNotFound(err error) bool + func IsErrUnauthorized(err error) bool + func IsErrVolumeNotFound(err error) bool + func ParseHost(host string) (string, string, string, error) + type APIClient interface + type Client struct + func NewClient(host string, version string, client *http.Client, ...) (*Client, error) + func NewEnvClient() (*Client, error) + func (cli *Client) CheckpointCreate(ctx context.Context, container string, options types.CheckpointCreateOptions) error + func (cli *Client) CheckpointDelete(ctx context.Context, containerID string, checkpointID string) error + func (cli *Client) CheckpointList(ctx context.Context, container string) ([]types.Checkpoint, error) + func (cli *Client) ClientVersion() string + func (cli *Client) ContainerAttach(ctx context.Context, container string, options types.ContainerAttachOptions) (types.HijackedResponse, error) + func (cli *Client) ContainerCommit(ctx context.Context, container string, options types.ContainerCommitOptions) (types.ContainerCommitResponse, error) + func (cli *Client) ContainerCreate(ctx context.Context, config *container.Config, ...) (types.ContainerCreateResponse, error) + func (cli *Client) ContainerDiff(ctx context.Context, containerID string) ([]types.ContainerChange, error) + func (cli *Client) ContainerExecAttach(ctx context.Context, execID string, config types.ExecConfig) (types.HijackedResponse, error) + func (cli *Client) ContainerExecCreate(ctx context.Context, container string, config types.ExecConfig) (types.ContainerExecCreateResponse, error) + func (cli *Client) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error) + func (cli *Client) ContainerExecResize(ctx context.Context, execID string, options types.ResizeOptions) error + func (cli *Client) ContainerExecStart(ctx context.Context, execID string, config types.ExecStartCheck) error + func (cli *Client) ContainerExport(ctx context.Context, containerID string) (io.ReadCloser, error) + func (cli *Client) ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error) + func (cli *Client) ContainerInspectWithRaw(ctx context.Context, containerID string, getSize bool) (types.ContainerJSON, []byte, error) + func (cli *Client) ContainerKill(ctx context.Context, containerID, signal string) error + func (cli *Client) ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error) + func (cli *Client) ContainerLogs(ctx context.Context, container string, options types.ContainerLogsOptions) (io.ReadCloser, error) + func (cli *Client) ContainerPause(ctx context.Context, containerID string) error + func (cli *Client) ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error + func (cli *Client) ContainerRename(ctx context.Context, containerID, newContainerName string) error + func (cli *Client) ContainerResize(ctx context.Context, containerID string, options types.ResizeOptions) error + func (cli *Client) ContainerRestart(ctx context.Context, containerID string, timeout *time.Duration) error + func (cli *Client) ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error + func (cli *Client) ContainerStatPath(ctx context.Context, containerID, path string) (types.ContainerPathStat, error) + func (cli *Client) ContainerStats(ctx context.Context, containerID string, stream bool) (io.ReadCloser, error) + func (cli *Client) ContainerStop(ctx context.Context, containerID string, timeout *time.Duration) error + func (cli *Client) ContainerTop(ctx context.Context, containerID string, arguments []string) (types.ContainerProcessList, error) + func (cli *Client) ContainerUnpause(ctx context.Context, containerID string) error + func (cli *Client) ContainerUpdate(ctx context.Context, containerID string, updateConfig container.UpdateConfig) (types.ContainerUpdateResponse, error) + func (cli *Client) ContainerWait(ctx context.Context, containerID string) (int, error) + func (cli *Client) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error) + func (cli *Client) CopyToContainer(ctx context.Context, container, path string, content io.Reader, ...) error + func (cli *Client) Events(ctx context.Context, options types.EventsOptions) (io.ReadCloser, error) + func (cli *Client) ImageBuild(ctx context.Context, buildContext io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error) + func (cli *Client) ImageCreate(ctx context.Context, parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error) + func (cli *Client) ImageHistory(ctx context.Context, imageID string) ([]types.ImageHistory, error) + func (cli *Client) ImageImport(ctx context.Context, source types.ImageImportSource, ref string, ...) (io.ReadCloser, error) + func (cli *Client) ImageInspectWithRaw(ctx context.Context, imageID string) (types.ImageInspect, []byte, error) + func (cli *Client) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.Image, error) + func (cli *Client) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error) + func (cli *Client) ImagePull(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, error) + func (cli *Client) ImagePush(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error) + func (cli *Client) ImageRemove(ctx context.Context, imageID string, options types.ImageRemoveOptions) ([]types.ImageDelete, error) + func (cli *Client) ImageSave(ctx context.Context, imageIDs []string) (io.ReadCloser, error) + func (cli *Client) ImageSearch(ctx context.Context, term string, options types.ImageSearchOptions) ([]registry.SearchResult, error) + func (cli *Client) ImageTag(ctx context.Context, imageID, ref string) error + func (cli *Client) Info(ctx context.Context) (types.Info, error) + func (cli *Client) NetworkConnect(ctx context.Context, networkID, containerID string, ...) error + func (cli *Client) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error) + func (cli *Client) NetworkDisconnect(ctx context.Context, networkID, containerID string, force bool) error + func (cli *Client) NetworkInspect(ctx context.Context, networkID string) (types.NetworkResource, error) + func (cli *Client) NetworkInspectWithRaw(ctx context.Context, networkID string) (types.NetworkResource, []byte, error) + func (cli *Client) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) + func (cli *Client) NetworkRemove(ctx context.Context, networkID string) error + func (cli *Client) NodeInspectWithRaw(ctx context.Context, nodeID string) (swarm.Node, []byte, error) + func (cli *Client) NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error) + func (cli *Client) NodeRemove(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error + func (cli *Client) NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error + func (cli *Client) RegistryLogin(ctx context.Context, auth types.AuthConfig) (types.AuthResponse, error) + func (cli *Client) ServerVersion(ctx context.Context) (types.Version, error) + func (cli *Client) ServiceCreate(ctx context.Context, service swarm.ServiceSpec, ...) (types.ServiceCreateResponse, error) + func (cli *Client) ServiceInspectWithRaw(ctx context.Context, serviceID string) (swarm.Service, []byte, error) + func (cli *Client) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error) + func (cli *Client) ServiceRemove(ctx context.Context, serviceID string) error + func (cli *Client) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, ...) error + func (cli *Client) SwarmInit(ctx context.Context, req swarm.InitRequest) (string, error) + func (cli *Client) SwarmInspect(ctx context.Context) (swarm.Swarm, error) + func (cli *Client) SwarmJoin(ctx context.Context, req swarm.JoinRequest) error + func (cli *Client) SwarmLeave(ctx context.Context, force bool) error + func (cli *Client) SwarmUpdate(ctx context.Context, version swarm.Version, swarm swarm.Spec, ...) error + func (cli *Client) TaskInspectWithRaw(ctx context.Context, taskID string) (swarm.Task, []byte, error) + func (cli *Client) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error) + func (cli *Client) UpdateClientVersion(v string) + func (cli *Client) VolumeCreate(ctx context.Context, options types.VolumeCreateRequest) (types.Volume, error) + func (cli *Client) VolumeInspect(ctx context.Context, volumeID string) (types.Volume, error) + func (cli *Client) VolumeInspectWithRaw(ctx context.Context, volumeID string) (types.Volume, []byte, error) + func (cli *Client) VolumeList(ctx context.Context, filter filters.Args) (types.VolumesListResponse, error) + func (cli *Client) VolumeRemove(ctx context.Context, volumeID string, force bool) error + type CommonAPIClient interface + ClientVersion func() string + ServerVersion func(ctx context.Context) (types.Version, error) + UpdateClientVersion func(v string) + type ContainerAPIClient interface + ContainerAttach func(ctx context.Context, container string, options types.ContainerAttachOptions) (types.HijackedResponse, error) + ContainerCommit func(ctx context.Context, container string, options types.ContainerCommitOptions) (types.ContainerCommitResponse, error) + ContainerCreate func(ctx context.Context, config *container.Config, ...) (types.ContainerCreateResponse, error) + ContainerDiff func(ctx context.Context, container string) ([]types.ContainerChange, error) + ContainerExecAttach func(ctx context.Context, execID string, config types.ExecConfig) (types.HijackedResponse, error) + ContainerExecCreate func(ctx context.Context, container string, config types.ExecConfig) (types.ContainerExecCreateResponse, error) + ContainerExecInspect func(ctx context.Context, execID string) (types.ContainerExecInspect, error) + ContainerExecResize func(ctx context.Context, execID string, options types.ResizeOptions) error + ContainerExecStart func(ctx context.Context, execID string, config types.ExecStartCheck) error + ContainerExport func(ctx context.Context, container string) (io.ReadCloser, error) + ContainerInspect func(ctx context.Context, container string) (types.ContainerJSON, error) + ContainerInspectWithRaw func(ctx context.Context, container string, getSize bool) (types.ContainerJSON, []byte, error) + ContainerKill func(ctx context.Context, container, signal string) error + ContainerList func(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error) + ContainerLogs func(ctx context.Context, container string, options types.ContainerLogsOptions) (io.ReadCloser, error) + ContainerPause func(ctx context.Context, container string) error + ContainerRemove func(ctx context.Context, container string, options types.ContainerRemoveOptions) error + ContainerRename func(ctx context.Context, container, newContainerName string) error + ContainerResize func(ctx context.Context, container string, options types.ResizeOptions) error + ContainerRestart func(ctx context.Context, container string, timeout *time.Duration) error + ContainerStart func(ctx context.Context, container string, options types.ContainerStartOptions) error + ContainerStatPath func(ctx context.Context, container, path string) (types.ContainerPathStat, error) + ContainerStats func(ctx context.Context, container string, stream bool) (io.ReadCloser, error) + ContainerStop func(ctx context.Context, container string, timeout *time.Duration) error + ContainerTop func(ctx context.Context, container string, arguments []string) (types.ContainerProcessList, error) + ContainerUnpause func(ctx context.Context, container string) error + ContainerUpdate func(ctx context.Context, container string, updateConfig container.UpdateConfig) (types.ContainerUpdateResponse, error) + ContainerWait func(ctx context.Context, container string) (int, error) + CopyFromContainer func(ctx context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error) + CopyToContainer func(ctx context.Context, container, path string, content io.Reader, ...) error + type ImageAPIClient interface + ImageBuild func(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error) + ImageCreate func(ctx context.Context, parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error) + ImageHistory func(ctx context.Context, image string) ([]types.ImageHistory, error) + ImageImport func(ctx context.Context, source types.ImageImportSource, ref string, ...) (io.ReadCloser, error) + ImageInspectWithRaw func(ctx context.Context, image string) (types.ImageInspect, []byte, error) + ImageList func(ctx context.Context, options types.ImageListOptions) ([]types.Image, error) + ImageLoad func(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error) + ImagePull func(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, error) + ImagePush func(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error) + ImageRemove func(ctx context.Context, image string, options types.ImageRemoveOptions) ([]types.ImageDelete, error) + ImageSave func(ctx context.Context, images []string) (io.ReadCloser, error) + ImageSearch func(ctx context.Context, term string, options types.ImageSearchOptions) ([]registry.SearchResult, error) + ImageTag func(ctx context.Context, image, ref string) error + type NetworkAPIClient interface + NetworkConnect func(ctx context.Context, networkID, container string, ...) error + NetworkCreate func(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error) + NetworkDisconnect func(ctx context.Context, networkID, container string, force bool) error + NetworkInspect func(ctx context.Context, networkID string) (types.NetworkResource, error) + NetworkInspectWithRaw func(ctx context.Context, networkID string) (types.NetworkResource, []byte, error) + NetworkList func(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) + NetworkRemove func(ctx context.Context, networkID string) error + type NodeAPIClient interface + NodeInspectWithRaw func(ctx context.Context, nodeID string) (swarm.Node, []byte, error) + NodeList func(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error) + NodeRemove func(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error + NodeUpdate func(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error + type ServiceAPIClient interface + ServiceCreate func(ctx context.Context, service swarm.ServiceSpec, ...) (types.ServiceCreateResponse, error) + ServiceInspectWithRaw func(ctx context.Context, serviceID string) (swarm.Service, []byte, error) + ServiceList func(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error) + ServiceRemove func(ctx context.Context, serviceID string) error + ServiceUpdate func(ctx context.Context, serviceID string, version swarm.Version, ...) error + TaskInspectWithRaw func(ctx context.Context, taskID string) (swarm.Task, []byte, error) + TaskList func(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error) + type SwarmAPIClient interface + SwarmInit func(ctx context.Context, req swarm.InitRequest) (string, error) + SwarmInspect func(ctx context.Context) (swarm.Swarm, error) + SwarmJoin func(ctx context.Context, req swarm.JoinRequest) error + SwarmLeave func(ctx context.Context, force bool) error + SwarmUpdate func(ctx context.Context, version swarm.Version, swarm swarm.Spec, ...) error + type SystemAPIClient interface + Events func(ctx context.Context, options types.EventsOptions) (io.ReadCloser, error) + Info func(ctx context.Context) (types.Info, error) + RegistryLogin func(ctx context.Context, auth types.AuthConfig) (types.AuthResponse, error) + type VolumeAPIClient interface + VolumeCreate func(ctx context.Context, options types.VolumeCreateRequest) (types.Volume, error) + VolumeInspect func(ctx context.Context, volumeID string) (types.Volume, error) + VolumeInspectWithRaw func(ctx context.Context, volumeID string) (types.Volume, []byte, error) + VolumeList func(ctx context.Context, filter filters.Args) (types.VolumesListResponse, error) + VolumeRemove func(ctx context.Context, volumeID string, force bool) error