Documentation ¶
Index ¶
- type CommonAPIClientMock
- func (m *CommonAPIClientMock) ClientVersion() string
- func (m *CommonAPIClientMock) Close() error
- func (m *CommonAPIClientMock) DaemonHost() string
- func (m *CommonAPIClientMock) DialSession(ctx context.Context, proto string, meta map[string][]string) (net.Conn, error)
- func (m *CommonAPIClientMock) Dialer() func(context.Context) (net.Conn, error)
- func (m *CommonAPIClientMock) HTTPClient() *http.Client
- func (m *CommonAPIClientMock) NegotiateAPIVersion(ctx context.Context)
- func (m *CommonAPIClientMock) NegotiateAPIVersionPing(ping types.Ping)
- func (m *CommonAPIClientMock) ServerVersion(ctx context.Context) (types.Version, error)
- type ConfigAPIClientMock
- func (m *ConfigAPIClientMock) ConfigCreate(ctx context.Context, config swarm.ConfigSpec) (types.ConfigCreateResponse, error)
- func (m *ConfigAPIClientMock) ConfigInspectWithRaw(ctx context.Context, name string) (swarm.Config, []byte, error)
- func (m *ConfigAPIClientMock) ConfigList(ctx context.Context, options types.ConfigListOptions) ([]swarm.Config, error)
- func (m *ConfigAPIClientMock) ConfigRemove(ctx context.Context, id string) error
- func (m *ConfigAPIClientMock) ConfigUpdate(ctx context.Context, id string, version swarm.Version, config swarm.ConfigSpec) error
- type ContainerAPIClientMock
- func (m *ContainerAPIClientMock) ContainerAttach(ctx context.Context, container string, options types.ContainerAttachOptions) (types.HijackedResponse, error)
- func (m *ContainerAPIClientMock) ContainerCommit(ctx context.Context, container string, options types.ContainerCommitOptions) (types.IDResponse, error)
- func (m *ContainerAPIClientMock) ContainerCreate(ctx context.Context, config *containertypes.Config, ...) (containertypes.ContainerCreateCreatedBody, error)
- func (m *ContainerAPIClientMock) ContainerDiff(ctx context.Context, container string) ([]containertypes.ContainerChangeResponseItem, error)
- func (m *ContainerAPIClientMock) ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error)
- func (m *ContainerAPIClientMock) ContainerExecCreate(ctx context.Context, container string, config types.ExecConfig) (types.IDResponse, error)
- func (m *ContainerAPIClientMock) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error)
- func (m *ContainerAPIClientMock) ContainerExecResize(ctx context.Context, execID string, options types.ResizeOptions) error
- func (m *ContainerAPIClientMock) ContainerExecStart(ctx context.Context, execID string, config types.ExecStartCheck) error
- func (m *ContainerAPIClientMock) ContainerExport(ctx context.Context, container string) (io.ReadCloser, error)
- func (m *ContainerAPIClientMock) ContainerInspect(ctx context.Context, container string) (types.ContainerJSON, error)
- func (m *ContainerAPIClientMock) ContainerInspectWithRaw(ctx context.Context, container string, getSize bool) (types.ContainerJSON, []byte, error)
- func (m *ContainerAPIClientMock) ContainerKill(ctx context.Context, container, signal string) error
- func (m *ContainerAPIClientMock) ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error)
- func (m *ContainerAPIClientMock) ContainerLogs(ctx context.Context, container string, options types.ContainerLogsOptions) (io.ReadCloser, error)
- func (m *ContainerAPIClientMock) ContainerPause(ctx context.Context, container string) error
- func (m *ContainerAPIClientMock) ContainerRemove(ctx context.Context, container string, options types.ContainerRemoveOptions) error
- func (m *ContainerAPIClientMock) ContainerRename(ctx context.Context, container, newContainerName string) error
- func (m *ContainerAPIClientMock) ContainerResize(ctx context.Context, container string, options types.ResizeOptions) error
- func (m *ContainerAPIClientMock) ContainerRestart(ctx context.Context, container string, timeout *time.Duration) error
- func (m *ContainerAPIClientMock) ContainerStart(ctx context.Context, container string, options types.ContainerStartOptions) error
- func (m *ContainerAPIClientMock) ContainerStatPath(ctx context.Context, container, path string) (types.ContainerPathStat, error)
- func (m *ContainerAPIClientMock) ContainerStats(ctx context.Context, container string, stream bool) (types.ContainerStats, error)
- func (m *ContainerAPIClientMock) ContainerStop(ctx context.Context, container string, timeout *time.Duration) error
- func (m *ContainerAPIClientMock) ContainerTop(ctx context.Context, container string, arguments []string) (containertypes.ContainerTopOKBody, error)
- func (m *ContainerAPIClientMock) ContainerUnpause(ctx context.Context, container string) error
- func (m *ContainerAPIClientMock) ContainerUpdate(ctx context.Context, container string, ...) (containertypes.ContainerUpdateOKBody, error)
- func (m *ContainerAPIClientMock) ContainerWait(ctx context.Context, container string, condition containertypes.WaitCondition) (<-chan containertypes.ContainerWaitOKBody, <-chan error)
- func (m *ContainerAPIClientMock) ContainersPrune(ctx context.Context, pruneFilters filters.Args) (types.ContainersPruneReport, error)
- func (m *ContainerAPIClientMock) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error)
- func (m *ContainerAPIClientMock) CopyToContainer(ctx context.Context, container, path string, content io.Reader, ...) error
- type DistributionAPIClientMock
- type ImageAPIClientMock
- func (m *ImageAPIClientMock) BuildCachePrune(ctx context.Context) (*types.BuildCachePruneReport, error)
- func (m *ImageAPIClientMock) BuildCancel(ctx context.Context, id string) error
- func (m *ImageAPIClientMock) ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)
- func (m *ImageAPIClientMock) ImageCreate(ctx context.Context, parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error)
- func (m *ImageAPIClientMock) ImageHistory(ctx context.Context, imageID string) ([]image.HistoryResponseItem, error)
- func (m *ImageAPIClientMock) ImageImport(ctx context.Context, source types.ImageImportSource, ref string, ...) (io.ReadCloser, error)
- func (m *ImageAPIClientMock) ImageInspectWithRaw(ctx context.Context, image string) (types.ImageInspect, []byte, error)
- func (m *ImageAPIClientMock) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error)
- func (m *ImageAPIClientMock) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error)
- func (m *ImageAPIClientMock) ImagePull(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, error)
- func (m *ImageAPIClientMock) ImagePush(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error)
- func (m *ImageAPIClientMock) ImageRemove(ctx context.Context, image string, options types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error)
- func (m *ImageAPIClientMock) ImageSave(ctx context.Context, images []string) (io.ReadCloser, error)
- func (m *ImageAPIClientMock) ImageSearch(ctx context.Context, term string, options types.ImageSearchOptions) ([]registry.SearchResult, error)
- func (m *ImageAPIClientMock) ImageTag(ctx context.Context, image, ref string) error
- func (m *ImageAPIClientMock) ImagesPrune(ctx context.Context, pruneFilter filters.Args) (types.ImagesPruneReport, error)
- type NetworkAPIClientMock
- func (m *NetworkAPIClientMock) NetworkConnect(ctx context.Context, network, container string, ...) error
- func (m *NetworkAPIClientMock) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error)
- func (m *NetworkAPIClientMock) NetworkDisconnect(ctx context.Context, network, container string, force bool) error
- func (m *NetworkAPIClientMock) NetworkInspect(ctx context.Context, network string, options types.NetworkInspectOptions) (types.NetworkResource, error)
- func (m *NetworkAPIClientMock) NetworkInspectWithRaw(ctx context.Context, network string, options types.NetworkInspectOptions) (types.NetworkResource, []byte, error)
- func (m *NetworkAPIClientMock) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error)
- func (m *NetworkAPIClientMock) NetworkRemove(ctx context.Context, network string) error
- func (m *NetworkAPIClientMock) NetworksPrune(ctx context.Context, pruneFilter filters.Args) (types.NetworksPruneReport, error)
- type NodeAPIClientMock
- func (m *NodeAPIClientMock) NodeInspectWithRaw(ctx context.Context, nodeID string) (swarm.Node, []byte, error)
- func (m *NodeAPIClientMock) NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error)
- func (m *NodeAPIClientMock) NodeRemove(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error
- func (m *NodeAPIClientMock) NodeUpdate(ctx context.Context, nodeID string, version swarm.Version, node swarm.NodeSpec) error
- type PluginAPIClientMock
- func (m *PluginAPIClientMock) PluginCreate(ctx context.Context, createContext io.Reader, ...) error
- func (m *PluginAPIClientMock) PluginDisable(ctx context.Context, name string, options types.PluginDisableOptions) error
- func (m *PluginAPIClientMock) PluginEnable(ctx context.Context, name string, options types.PluginEnableOptions) error
- func (m *PluginAPIClientMock) PluginInspectWithRaw(ctx context.Context, name string) (*types.Plugin, []byte, error)
- func (m *PluginAPIClientMock) PluginInstall(ctx context.Context, name string, options types.PluginInstallOptions) (io.ReadCloser, error)
- func (m *PluginAPIClientMock) PluginList(ctx context.Context, filter filters.Args) (types.PluginsListResponse, error)
- func (m *PluginAPIClientMock) PluginPush(ctx context.Context, name string, registryAuth string) (io.ReadCloser, error)
- func (m *PluginAPIClientMock) PluginRemove(ctx context.Context, name string, options types.PluginRemoveOptions) error
- func (m *PluginAPIClientMock) PluginSet(ctx context.Context, name string, args []string) error
- func (m *PluginAPIClientMock) PluginUpgrade(ctx context.Context, name string, options types.PluginInstallOptions) (io.ReadCloser, error)
- type SecretAPIClientMock
- func (m *SecretAPIClientMock) SecretCreate(ctx context.Context, secret swarm.SecretSpec) (types.SecretCreateResponse, error)
- func (m *SecretAPIClientMock) SecretInspectWithRaw(ctx context.Context, name string) (swarm.Secret, []byte, error)
- func (m *SecretAPIClientMock) SecretList(ctx context.Context, options types.SecretListOptions) ([]swarm.Secret, error)
- func (m *SecretAPIClientMock) SecretRemove(ctx context.Context, id string) error
- func (m *SecretAPIClientMock) SecretUpdate(ctx context.Context, id string, version swarm.Version, secret swarm.SecretSpec) error
- type ServiceAPIClientMock
- func (m *ServiceAPIClientMock) ServiceCreate(ctx context.Context, service swarm.ServiceSpec, ...) (types.ServiceCreateResponse, error)
- func (m *ServiceAPIClientMock) ServiceInspectWithRaw(ctx context.Context, serviceID string, options types.ServiceInspectOptions) (swarm.Service, []byte, error)
- func (m *ServiceAPIClientMock) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error)
- func (m *ServiceAPIClientMock) ServiceLogs(ctx context.Context, serviceID string, options types.ContainerLogsOptions) (io.ReadCloser, error)
- func (m *ServiceAPIClientMock) ServiceRemove(ctx context.Context, serviceID string) error
- func (m *ServiceAPIClientMock) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, ...) (types.ServiceUpdateResponse, error)
- func (m *ServiceAPIClientMock) TaskInspectWithRaw(ctx context.Context, taskID string) (swarm.Task, []byte, error)
- func (m *ServiceAPIClientMock) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error)
- func (m *ServiceAPIClientMock) TaskLogs(ctx context.Context, taskID string, options types.ContainerLogsOptions) (io.ReadCloser, error)
- type SwarmAPIClientMock
- func (m *SwarmAPIClientMock) SwarmGetUnlockKey(ctx context.Context) (types.SwarmUnlockKeyResponse, error)
- func (m *SwarmAPIClientMock) SwarmInit(ctx context.Context, req swarm.InitRequest) (string, error)
- func (m *SwarmAPIClientMock) SwarmInspect(ctx context.Context) (swarm.Swarm, error)
- func (m *SwarmAPIClientMock) SwarmJoin(ctx context.Context, req swarm.JoinRequest) error
- func (m *SwarmAPIClientMock) SwarmLeave(ctx context.Context, force bool) error
- func (m *SwarmAPIClientMock) SwarmUnlock(ctx context.Context, req swarm.UnlockRequest) error
- func (m *SwarmAPIClientMock) SwarmUpdate(ctx context.Context, version swarm.Version, swarm swarm.Spec, ...) error
- type SystemAPIClientMock
- func (m *SystemAPIClientMock) DiskUsage(ctx context.Context) (types.DiskUsage, error)
- func (m *SystemAPIClientMock) Events(ctx context.Context, options types.EventsOptions) (<-chan events.Message, <-chan error)
- func (m *SystemAPIClientMock) Info(ctx context.Context) (types.Info, error)
- func (m *SystemAPIClientMock) Ping(ctx context.Context) (types.Ping, error)
- func (m *SystemAPIClientMock) RegistryLogin(ctx context.Context, auth types.AuthConfig) (registry.AuthenticateOKBody, error)
- type VolumeAPIClientMock
- func (m *VolumeAPIClientMock) VolumeCreate(ctx context.Context, options volumetypes.VolumeCreateBody) (types.Volume, error)
- func (m *VolumeAPIClientMock) VolumeInspect(ctx context.Context, volumeID string) (types.Volume, error)
- func (m *VolumeAPIClientMock) VolumeInspectWithRaw(ctx context.Context, volumeID string) (types.Volume, []byte, error)
- func (m *VolumeAPIClientMock) VolumeList(ctx context.Context, filter filters.Args) (volumetypes.VolumeListOKBody, error)
- func (m *VolumeAPIClientMock) VolumeRemove(ctx context.Context, volumeID string, force bool) error
- func (m *VolumeAPIClientMock) VolumesPrune(ctx context.Context, pruneFilter filters.Args) (types.VolumesPruneReport, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommonAPIClientMock ¶
type CommonAPIClientMock struct { *mock.Mock *ConfigAPIClientMock *ContainerAPIClientMock *DistributionAPIClientMock *ImageAPIClientMock *NodeAPIClientMock *NetworkAPIClientMock *PluginAPIClientMock *ServiceAPIClientMock *SwarmAPIClientMock *SecretAPIClientMock *SystemAPIClientMock *VolumeAPIClientMock }
CommonAPIClientMock is the common methods between stable and experimental versions of APIClient.
func NewCommonAPIClientMock ¶
func NewCommonAPIClientMock() *CommonAPIClientMock
NewCommonAPIClientMock creates docker ContainerAPIClient mock.
func (*CommonAPIClientMock) ClientVersion ¶
func (m *CommonAPIClientMock) ClientVersion() string
ClientVersion returns the API version used by this client.
func (*CommonAPIClientMock) Close ¶
func (m *CommonAPIClientMock) Close() error
Close the transport used by the client.
func (*CommonAPIClientMock) DaemonHost ¶
func (m *CommonAPIClientMock) DaemonHost() string
DaemonHost returns the host address used by the client.
func (*CommonAPIClientMock) DialSession ¶
func (m *CommonAPIClientMock) DialSession(ctx context.Context, proto string, meta map[string][]string) (net.Conn, error)
DialSession returns a connection that can be used communication with daemon.
func (*CommonAPIClientMock) Dialer ¶
Dialer returns a dialer for a raw stream connection, with HTTP/1.1 header, that can be used for proxying the daemon connection. Used by `docker dial-stdio`.
func (*CommonAPIClientMock) HTTPClient ¶
func (m *CommonAPIClientMock) HTTPClient() *http.Client
HTTPClient returns a copy of the HTTP client bound to the server.
func (*CommonAPIClientMock) NegotiateAPIVersion ¶
func (m *CommonAPIClientMock) NegotiateAPIVersion(ctx context.Context)
NegotiateAPIVersion queries the API and updates the version to match the API version. Any errors are silently ignored.
func (*CommonAPIClientMock) NegotiateAPIVersionPing ¶
func (m *CommonAPIClientMock) NegotiateAPIVersionPing(ping types.Ping)
NegotiateAPIVersionPing updates the client version to match the Ping.APIVersion if the ping version is less than the default version.
func (*CommonAPIClientMock) ServerVersion ¶
ServerVersion returns information of the docker client and server host.
type ConfigAPIClientMock ¶
ConfigAPIClientMock defines API client methods for configs.
func (*ConfigAPIClientMock) ConfigCreate ¶
func (m *ConfigAPIClientMock) ConfigCreate(ctx context.Context, config swarm.ConfigSpec) (types.ConfigCreateResponse, error)
ConfigCreate creates a new Config.
func (*ConfigAPIClientMock) ConfigInspectWithRaw ¶
func (m *ConfigAPIClientMock) ConfigInspectWithRaw(ctx context.Context, name string) (swarm.Config, []byte, error)
ConfigInspectWithRaw returns the config information with raw data.
func (*ConfigAPIClientMock) ConfigList ¶
func (m *ConfigAPIClientMock) ConfigList(ctx context.Context, options types.ConfigListOptions) ([]swarm.Config, error)
ConfigList returns the list of configs.
func (*ConfigAPIClientMock) ConfigRemove ¶
func (m *ConfigAPIClientMock) ConfigRemove(ctx context.Context, id string) error
ConfigRemove removes a Config.
func (*ConfigAPIClientMock) ConfigUpdate ¶
func (m *ConfigAPIClientMock) ConfigUpdate(ctx context.Context, id string, version swarm.Version, config swarm.ConfigSpec) error
ConfigUpdate attempts to update a Config.
type ContainerAPIClientMock ¶
ContainerAPIClientMock defines API client methods for the containers
func (*ContainerAPIClientMock) ContainerAttach ¶
func (m *ContainerAPIClientMock) ContainerAttach(ctx context.Context, container string, options types.ContainerAttachOptions) (types.HijackedResponse, error)
ContainerAttach attaches a connection to a container in the server. It returns a types.HijackedConnection with the hijacked connection and the a reader to get output. It's up to the called to close the hijacked connection by calling types.HijackedResponse.Close.
func (*ContainerAPIClientMock) ContainerCommit ¶
func (m *ContainerAPIClientMock) ContainerCommit(ctx context.Context, container string, options types.ContainerCommitOptions) (types.IDResponse, error)
ContainerCommit applies changes into a container and creates a new tagged image.
func (*ContainerAPIClientMock) ContainerCreate ¶
func (m *ContainerAPIClientMock) ContainerCreate(ctx context.Context, config *containertypes.Config, hostConfig *containertypes.HostConfig, networkingConfig *networktypes.NetworkingConfig, containerName string) (containertypes.ContainerCreateCreatedBody, error)
ContainerCreate creates a new container based in the given configuration. It can be associated with a name, but it's not mandatory.
func (*ContainerAPIClientMock) ContainerDiff ¶
func (m *ContainerAPIClientMock) ContainerDiff(ctx context.Context, container string) ([]containertypes.ContainerChangeResponseItem, error)
ContainerDiff shows differences in a container filesystem since it was started.
func (*ContainerAPIClientMock) ContainerExecAttach ¶
func (m *ContainerAPIClientMock) ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error)
ContainerExecAttach attaches a connection to an exec process in the server. It returns a types.HijackedConnection with the hijacked connection and the a reader to get output. It's up to the called to close the hijacked connection by calling types.HijackedResponse.Close.
func (*ContainerAPIClientMock) ContainerExecCreate ¶
func (m *ContainerAPIClientMock) ContainerExecCreate(ctx context.Context, container string, config types.ExecConfig) (types.IDResponse, error)
ContainerExecCreate creates a new exec configuration to run an exec process.
func (*ContainerAPIClientMock) ContainerExecInspect ¶
func (m *ContainerAPIClientMock) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error)
ContainerExecInspect returns information about a specific exec process on the docker host.
func (*ContainerAPIClientMock) ContainerExecResize ¶
func (m *ContainerAPIClientMock) ContainerExecResize(ctx context.Context, execID string, options types.ResizeOptions) error
ContainerExecResize changes the size of the tty for an exec process running inside a container.
func (*ContainerAPIClientMock) ContainerExecStart ¶
func (m *ContainerAPIClientMock) ContainerExecStart(ctx context.Context, execID string, config types.ExecStartCheck) error
ContainerExecStart starts an exec process already created in the docker host.
func (*ContainerAPIClientMock) ContainerExport ¶
func (m *ContainerAPIClientMock) ContainerExport(ctx context.Context, container string) (io.ReadCloser, error)
ContainerExport retrieves the raw contents of a container and returns them as an io.ReadCloser. It's up to the caller to close the stream.
func (*ContainerAPIClientMock) ContainerInspect ¶
func (m *ContainerAPIClientMock) ContainerInspect(ctx context.Context, container string) (types.ContainerJSON, error)
ContainerInspect returns the container information.
func (*ContainerAPIClientMock) ContainerInspectWithRaw ¶
func (m *ContainerAPIClientMock) ContainerInspectWithRaw(ctx context.Context, container string, getSize bool) (types.ContainerJSON, []byte, error)
ContainerInspectWithRaw returns the container information and its raw representation.
func (*ContainerAPIClientMock) ContainerKill ¶
func (m *ContainerAPIClientMock) ContainerKill(ctx context.Context, container, signal string) error
ContainerKill terminates the container process but does not remove the container from the docker host.
func (*ContainerAPIClientMock) ContainerList ¶
func (m *ContainerAPIClientMock) ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error)
ContainerList returns the list of containers in the docker host.
func (*ContainerAPIClientMock) ContainerLogs ¶
func (m *ContainerAPIClientMock) ContainerLogs(ctx context.Context, container string, options types.ContainerLogsOptions) (io.ReadCloser, error)
ContainerLogs returns the logs generated by a container in an io.ReadCloser. It's up to the caller to close the stream.
func (*ContainerAPIClientMock) ContainerPause ¶
func (m *ContainerAPIClientMock) ContainerPause(ctx context.Context, container string) error
ContainerPause pauses the main process of a given container without terminating it.
func (*ContainerAPIClientMock) ContainerRemove ¶
func (m *ContainerAPIClientMock) ContainerRemove(ctx context.Context, container string, options types.ContainerRemoveOptions) error
ContainerRemove kills and removes a container from the docker host.
func (*ContainerAPIClientMock) ContainerRename ¶
func (m *ContainerAPIClientMock) ContainerRename(ctx context.Context, container, newContainerName string) error
ContainerRename changes the name of a given container.
func (*ContainerAPIClientMock) ContainerResize ¶
func (m *ContainerAPIClientMock) ContainerResize(ctx context.Context, container string, options types.ResizeOptions) error
ContainerResize changes the size of the tty for a container.
func (*ContainerAPIClientMock) ContainerRestart ¶
func (m *ContainerAPIClientMock) ContainerRestart(ctx context.Context, container string, timeout *time.Duration) error
ContainerRestart stops and starts a container again. It makes the daemon to wait for the container to be up again for a specific amount of time, given the timeout.
func (*ContainerAPIClientMock) ContainerStart ¶
func (m *ContainerAPIClientMock) ContainerStart(ctx context.Context, container string, options types.ContainerStartOptions) error
ContainerStart sends a request to the docker daemon to start a container.
func (*ContainerAPIClientMock) ContainerStatPath ¶
func (m *ContainerAPIClientMock) ContainerStatPath(ctx context.Context, container, path string) (types.ContainerPathStat, error)
ContainerStatPath returns Stat information about a path inside the container filesystem.
func (*ContainerAPIClientMock) ContainerStats ¶
func (m *ContainerAPIClientMock) ContainerStats(ctx context.Context, container string, stream bool) (types.ContainerStats, error)
ContainerStats returns near realtime stats for a given container. It's up to the caller to close the io.ReadCloser returned.
func (*ContainerAPIClientMock) ContainerStop ¶
func (m *ContainerAPIClientMock) ContainerStop(ctx context.Context, container string, timeout *time.Duration) error
ContainerStop stops a container without terminating the process. The process is blocked until the container stops or the timeout expires.
func (*ContainerAPIClientMock) ContainerTop ¶
func (m *ContainerAPIClientMock) ContainerTop(ctx context.Context, container string, arguments []string) (containertypes.ContainerTopOKBody, error)
ContainerTop shows process information from within a container.
func (*ContainerAPIClientMock) ContainerUnpause ¶
func (m *ContainerAPIClientMock) ContainerUnpause(ctx context.Context, container string) error
ContainerUnpause resumes the process execution within a container
func (*ContainerAPIClientMock) ContainerUpdate ¶
func (m *ContainerAPIClientMock) ContainerUpdate(ctx context.Context, container string, updateConfig containertypes.UpdateConfig) (containertypes.ContainerUpdateOKBody, error)
ContainerUpdate updates resources of a container.
func (*ContainerAPIClientMock) ContainerWait ¶
func (m *ContainerAPIClientMock) ContainerWait(ctx context.Context, container string, condition containertypes.WaitCondition) (<-chan containertypes.ContainerWaitOKBody, <-chan error)
ContainerWait pauses execution until a container exits. It returns the API status code as response of its readiness.
func (*ContainerAPIClientMock) ContainersPrune ¶
func (m *ContainerAPIClientMock) ContainersPrune(ctx context.Context, pruneFilters filters.Args) (types.ContainersPruneReport, error)
ContainersPrune requests the daemon to delete unused data.
func (*ContainerAPIClientMock) CopyFromContainer ¶
func (m *ContainerAPIClientMock) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error)
CopyFromContainer gets the content from the container and returns it as a Reader to manipulate it in the host. It's up to the caller to close the reader.
func (*ContainerAPIClientMock) CopyToContainer ¶
func (m *ContainerAPIClientMock) CopyToContainer(ctx context.Context, container, path string, content io.Reader, options types.CopyToContainerOptions) error
CopyToContainer copies content into the container filesystem.
type DistributionAPIClientMock ¶
DistributionAPIClientMock defines API client methods for the registry.
func (*DistributionAPIClientMock) DistributionInspect ¶
func (m *DistributionAPIClientMock) DistributionInspect(ctx context.Context, image, encodedRegistryAuth string) (registry.DistributionInspect, error)
DistributionInspect returns the image digest with full Manifest.
type ImageAPIClientMock ¶
ImageAPIClientMock defines API client methods for the images.
func (*ImageAPIClientMock) BuildCachePrune ¶
func (m *ImageAPIClientMock) BuildCachePrune(ctx context.Context) (*types.BuildCachePruneReport, error)
BuildCachePrune requests the daemon to delete unused cache data.
func (*ImageAPIClientMock) BuildCancel ¶
func (m *ImageAPIClientMock) BuildCancel(ctx context.Context, id string) error
BuildCancel requests the daemon to cancel ongoing build request.
func (*ImageAPIClientMock) ImageBuild ¶
func (m *ImageAPIClientMock) ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)
ImageBuild sends request to the daemon to build images. The Body in the response implement an io.ReadCloser and it's up to the caller to close it.
func (*ImageAPIClientMock) ImageCreate ¶
func (m *ImageAPIClientMock) ImageCreate(ctx context.Context, parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error)
ImageCreate creates a new image based in the parent options. It returns the JSON content in the response body.
func (*ImageAPIClientMock) ImageHistory ¶
func (m *ImageAPIClientMock) ImageHistory(ctx context.Context, imageID string) ([]image.HistoryResponseItem, error)
ImageHistory returns the changes in an image in history format.
func (*ImageAPIClientMock) ImageImport ¶
func (m *ImageAPIClientMock) ImageImport(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error)
ImageImport creates a new image based in the source options. It returns the JSON content in the response body.
func (*ImageAPIClientMock) ImageInspectWithRaw ¶
func (m *ImageAPIClientMock) ImageInspectWithRaw(ctx context.Context, image string) (types.ImageInspect, []byte, error)
ImageInspectWithRaw returns the image information and its raw representation.
func (*ImageAPIClientMock) ImageList ¶
func (m *ImageAPIClientMock) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error)
ImageList returns a list of images in the docker host.
func (*ImageAPIClientMock) ImageLoad ¶
func (m *ImageAPIClientMock) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error)
ImageLoad loads an image in the docker host from the client host. It's up to the caller to close the io.ReadCloser in the ImageLoadResponse returned by this function.
func (*ImageAPIClientMock) ImagePull ¶
func (m *ImageAPIClientMock) ImagePull(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, error)
ImagePull requests the docker host to pull an image from a remote registry. It executes the privileged function if the operation is unauthorized and it tries one more time. It's up to the caller to handle the io.ReadCloser and close it properly.
func (*ImageAPIClientMock) ImagePush ¶
func (m *ImageAPIClientMock) ImagePush(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error)
ImagePush requests the docker host to push an image to a remote registry. It executes the privileged function if the operation is unauthorized and it tries one more time. It's up to the caller to handle the io.ReadCloser and close it properly.
func (*ImageAPIClientMock) ImageRemove ¶
func (m *ImageAPIClientMock) ImageRemove(ctx context.Context, image string, options types.ImageRemoveOptions) ([]types.ImageDeleteResponseItem, error)
ImageRemove removes an image from the docker host.
func (*ImageAPIClientMock) ImageSave ¶
func (m *ImageAPIClientMock) ImageSave(ctx context.Context, images []string) (io.ReadCloser, error)
ImageSave retrieves one or more images from the docker host as an io.ReadCloser. It's up to the caller to store the images and close the stream.
func (*ImageAPIClientMock) ImageSearch ¶
func (m *ImageAPIClientMock) ImageSearch(ctx context.Context, term string, options types.ImageSearchOptions) ([]registry.SearchResult, error)
ImageSearch makes the docker host to search by a term in a remote registry. The list of results is not sorted in any fashion.
func (*ImageAPIClientMock) ImageTag ¶
func (m *ImageAPIClientMock) ImageTag(ctx context.Context, image, ref string) error
ImageTag tags an image in the docker host.
func (*ImageAPIClientMock) ImagesPrune ¶
func (m *ImageAPIClientMock) ImagesPrune(ctx context.Context, pruneFilter filters.Args) (types.ImagesPruneReport, error)
ImagesPrune requests the daemon to delete unused data
type NetworkAPIClientMock ¶
NetworkAPIClientMock defines API client methods for the networks
func (*NetworkAPIClientMock) NetworkConnect ¶
func (m *NetworkAPIClientMock) NetworkConnect(ctx context.Context, network, container string, config *networktypes.EndpointSettings) error
NetworkConnect connects a container to an existent network in the docker host.
func (*NetworkAPIClientMock) NetworkCreate ¶
func (m *NetworkAPIClientMock) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error)
NetworkCreate creates a new network in the docker host.
func (*NetworkAPIClientMock) NetworkDisconnect ¶
func (m *NetworkAPIClientMock) NetworkDisconnect(ctx context.Context, network, container string, force bool) error
NetworkDisconnect disconnects a container from an existent network in the docker host.
func (*NetworkAPIClientMock) NetworkInspect ¶
func (m *NetworkAPIClientMock) NetworkInspect(ctx context.Context, network string, options types.NetworkInspectOptions) (types.NetworkResource, error)
NetworkInspect returns the information for a specific network configured in the docker host.
func (*NetworkAPIClientMock) NetworkInspectWithRaw ¶
func (m *NetworkAPIClientMock) NetworkInspectWithRaw(ctx context.Context, network string, options types.NetworkInspectOptions) (types.NetworkResource, []byte, error)
NetworkInspectWithRaw returns the information for a specific network configured in the docker host and its raw representation.
func (*NetworkAPIClientMock) NetworkList ¶
func (m *NetworkAPIClientMock) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error)
NetworkList returns the list of networks configured in the docker host.
func (*NetworkAPIClientMock) NetworkRemove ¶
func (m *NetworkAPIClientMock) NetworkRemove(ctx context.Context, network string) error
NetworkRemove removes an existent network from the docker host.
func (*NetworkAPIClientMock) NetworksPrune ¶
func (m *NetworkAPIClientMock) NetworksPrune(ctx context.Context, pruneFilter filters.Args) (types.NetworksPruneReport, error)
NetworksPrune requests the daemon to delete unused networks.
type NodeAPIClientMock ¶
NodeAPIClientMock defines API client methods for the nodes.
func (*NodeAPIClientMock) NodeInspectWithRaw ¶
func (m *NodeAPIClientMock) NodeInspectWithRaw(ctx context.Context, nodeID string) (swarm.Node, []byte, error)
NodeInspectWithRaw returns the node information.
func (*NodeAPIClientMock) NodeList ¶
func (m *NodeAPIClientMock) NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error)
NodeList returns the list of nodes.
func (*NodeAPIClientMock) NodeRemove ¶
func (m *NodeAPIClientMock) NodeRemove(ctx context.Context, nodeID string, options types.NodeRemoveOptions) error
NodeRemove removes a Node.
type PluginAPIClientMock ¶
PluginAPIClientMock defines API client methods for the plugins.
func (*PluginAPIClientMock) PluginCreate ¶
func (m *PluginAPIClientMock) PluginCreate(ctx context.Context, createContext io.Reader, options types.PluginCreateOptions) error
PluginCreate creates a plugin.
func (*PluginAPIClientMock) PluginDisable ¶
func (m *PluginAPIClientMock) PluginDisable(ctx context.Context, name string, options types.PluginDisableOptions) error
PluginDisable disables a plugin.
func (*PluginAPIClientMock) PluginEnable ¶
func (m *PluginAPIClientMock) PluginEnable(ctx context.Context, name string, options types.PluginEnableOptions) error
PluginEnable enables a plugin.
func (*PluginAPIClientMock) PluginInspectWithRaw ¶
func (m *PluginAPIClientMock) PluginInspectWithRaw(ctx context.Context, name string) (*types.Plugin, []byte, error)
PluginInspectWithRaw inspects an existing plugin.
func (*PluginAPIClientMock) PluginInstall ¶
func (m *PluginAPIClientMock) PluginInstall(ctx context.Context, name string, options types.PluginInstallOptions) (io.ReadCloser, error)
PluginInstall installs a plugin.
func (*PluginAPIClientMock) PluginList ¶
func (m *PluginAPIClientMock) PluginList(ctx context.Context, filter filters.Args) (types.PluginsListResponse, error)
PluginList returns the installed plugins.
func (*PluginAPIClientMock) PluginPush ¶
func (m *PluginAPIClientMock) PluginPush(ctx context.Context, name string, registryAuth string) (io.ReadCloser, error)
PluginPush pushes a plugin to a registry.
func (*PluginAPIClientMock) PluginRemove ¶
func (m *PluginAPIClientMock) PluginRemove(ctx context.Context, name string, options types.PluginRemoveOptions) error
PluginRemove removes a plugin.
func (*PluginAPIClientMock) PluginUpgrade ¶
func (m *PluginAPIClientMock) PluginUpgrade(ctx context.Context, name string, options types.PluginInstallOptions) (io.ReadCloser, error)
PluginUpgrade upgrades a plugin.
type SecretAPIClientMock ¶
SecretAPIClientMock defines API client methods for secrets.
func (*SecretAPIClientMock) SecretCreate ¶
func (m *SecretAPIClientMock) SecretCreate(ctx context.Context, secret swarm.SecretSpec) (types.SecretCreateResponse, error)
SecretCreate creates a new Secret.
func (*SecretAPIClientMock) SecretInspectWithRaw ¶
func (m *SecretAPIClientMock) SecretInspectWithRaw(ctx context.Context, name string) (swarm.Secret, []byte, error)
SecretInspectWithRaw returns the secret information with raw data.
func (*SecretAPIClientMock) SecretList ¶
func (m *SecretAPIClientMock) SecretList(ctx context.Context, options types.SecretListOptions) ([]swarm.Secret, error)
SecretList returns the list of secrets.
func (*SecretAPIClientMock) SecretRemove ¶
func (m *SecretAPIClientMock) SecretRemove(ctx context.Context, id string) error
SecretRemove removes a Secret.
func (*SecretAPIClientMock) SecretUpdate ¶
func (m *SecretAPIClientMock) SecretUpdate(ctx context.Context, id string, version swarm.Version, secret swarm.SecretSpec) error
SecretUpdate updates a Secret. Currently, the only part of a secret spec which can be updated is Labels.
type ServiceAPIClientMock ¶
ServiceAPIClientMock defines API client methods for the services.
func (*ServiceAPIClientMock) ServiceCreate ¶
func (m *ServiceAPIClientMock) ServiceCreate(ctx context.Context, service swarm.ServiceSpec, options types.ServiceCreateOptions) (types.ServiceCreateResponse, error)
ServiceCreate creates a new Service.
func (*ServiceAPIClientMock) ServiceInspectWithRaw ¶
func (m *ServiceAPIClientMock) ServiceInspectWithRaw(ctx context.Context, serviceID string, options types.ServiceInspectOptions) (swarm.Service, []byte, error)
ServiceInspectWithRaw returns the service information and the raw data.
func (*ServiceAPIClientMock) ServiceList ¶
func (m *ServiceAPIClientMock) ServiceList(ctx context.Context, options types.ServiceListOptions) ([]swarm.Service, error)
ServiceList returns the list of services.
func (*ServiceAPIClientMock) ServiceLogs ¶
func (m *ServiceAPIClientMock) ServiceLogs(ctx context.Context, serviceID string, options types.ContainerLogsOptions) (io.ReadCloser, error)
ServiceLogs returns the logs generated by a service in an io.ReadCloser. It's up to the caller to close the stream.
func (*ServiceAPIClientMock) ServiceRemove ¶
func (m *ServiceAPIClientMock) ServiceRemove(ctx context.Context, serviceID string) error
ServiceRemove kills and removes a service.
func (*ServiceAPIClientMock) ServiceUpdate ¶
func (m *ServiceAPIClientMock) ServiceUpdate(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec, options types.ServiceUpdateOptions) (types.ServiceUpdateResponse, error)
ServiceUpdate updates a Service.
func (*ServiceAPIClientMock) TaskInspectWithRaw ¶
func (m *ServiceAPIClientMock) TaskInspectWithRaw(ctx context.Context, taskID string) (swarm.Task, []byte, error)
TaskInspectWithRaw returns the task information and its raw representation..
func (*ServiceAPIClientMock) TaskList ¶
func (m *ServiceAPIClientMock) TaskList(ctx context.Context, options types.TaskListOptions) ([]swarm.Task, error)
TaskList returns the list of tasks.
func (*ServiceAPIClientMock) TaskLogs ¶
func (m *ServiceAPIClientMock) TaskLogs(ctx context.Context, taskID string, options types.ContainerLogsOptions) (io.ReadCloser, error)
TaskLogs returns the logs generated by a task in an io.ReadCloser. It's up to the caller to close the stream.
type SwarmAPIClientMock ¶
SwarmAPIClientMock defines API client methods for the swarm.
func (*SwarmAPIClientMock) SwarmGetUnlockKey ¶
func (m *SwarmAPIClientMock) SwarmGetUnlockKey(ctx context.Context) (types.SwarmUnlockKeyResponse, error)
SwarmGetUnlockKey retrieves the swarm's unlock key.
func (*SwarmAPIClientMock) SwarmInit ¶
func (m *SwarmAPIClientMock) SwarmInit(ctx context.Context, req swarm.InitRequest) (string, error)
SwarmInit initializes the Swarm.
func (*SwarmAPIClientMock) SwarmInspect ¶
SwarmInspect inspects the Swarm.
func (*SwarmAPIClientMock) SwarmJoin ¶
func (m *SwarmAPIClientMock) SwarmJoin(ctx context.Context, req swarm.JoinRequest) error
SwarmJoin joins the Swarm.
func (*SwarmAPIClientMock) SwarmLeave ¶
func (m *SwarmAPIClientMock) SwarmLeave(ctx context.Context, force bool) error
SwarmLeave leaves the Swarm.
func (*SwarmAPIClientMock) SwarmUnlock ¶
func (m *SwarmAPIClientMock) SwarmUnlock(ctx context.Context, req swarm.UnlockRequest) error
SwarmUnlock unlocks locked swarm.
func (*SwarmAPIClientMock) SwarmUpdate ¶
func (m *SwarmAPIClientMock) SwarmUpdate(ctx context.Context, version swarm.Version, swarm swarm.Spec, flags swarm.UpdateFlags) error
SwarmUpdate updates the Swarm.
type SystemAPIClientMock ¶
SystemAPIClientMock defines API client methods for the system.
func (*SystemAPIClientMock) Events ¶
func (m *SystemAPIClientMock) Events(ctx context.Context, options types.EventsOptions) (<-chan events.Message, <-chan error)
Events returns a stream of events in the daemon. It's up to the caller to close the stream by canceling the context. Once the stream has been completely read an io.EOF error will be sent over the error channel. If an error is sent all processing will be stopped. It's up to the caller to reopen the stream in the event of an error by reinvoking this method.
func (*SystemAPIClientMock) Ping ¶
Ping pings the server and return the value of the "Docker-Experimental" "API-Version" headers
func (*SystemAPIClientMock) RegistryLogin ¶
func (m *SystemAPIClientMock) RegistryLogin(ctx context.Context, auth types.AuthConfig) (registry.AuthenticateOKBody, error)
RegistryLogin authenticates the docker server with a given docker registry. It returns UnauthorizerError when the authentication fails.
type VolumeAPIClientMock ¶
VolumeAPIClientMock defines API client methods for the volumes.
func (*VolumeAPIClientMock) VolumeCreate ¶
func (m *VolumeAPIClientMock) VolumeCreate(ctx context.Context, options volumetypes.VolumeCreateBody) (types.Volume, error)
VolumeCreate creates a volume in the docker host.
func (*VolumeAPIClientMock) VolumeInspect ¶
func (m *VolumeAPIClientMock) VolumeInspect(ctx context.Context, volumeID string) (types.Volume, error)
VolumeInspect returns the information about a specific volume in the docker host.
func (*VolumeAPIClientMock) VolumeInspectWithRaw ¶
func (m *VolumeAPIClientMock) VolumeInspectWithRaw(ctx context.Context, volumeID string) (types.Volume, []byte, error)
VolumeInspectWithRaw returns the information about a specific volume in the docker host and its raw representation.
func (*VolumeAPIClientMock) VolumeList ¶
func (m *VolumeAPIClientMock) VolumeList(ctx context.Context, filter filters.Args) (volumetypes.VolumeListOKBody, error)
VolumeList returns the volumes configured in the docker host.
func (*VolumeAPIClientMock) VolumeRemove ¶
VolumeRemove removes a volume from the docker host.
func (*VolumeAPIClientMock) VolumesPrune ¶
func (m *VolumeAPIClientMock) VolumesPrune(ctx context.Context, pruneFilter filters.Args) (types.VolumesPruneReport, error)
VolumesPrune requests the daemon to delete unused data.