Documentation ¶
Overview ¶
Package mockdockerclient provides mocks for the Docker client github.com/docker/docker/client
Index ¶
- Variables
- type ContainerAPIClient
- func (c *ContainerAPIClient) ContainerAttach(context.Context, string, container.AttachOptions) (types.HijackedResponse, error)
- func (c *ContainerAPIClient) ContainerCommit(context.Context, string, container.CommitOptions) (types.IDResponse, error)
- func (c *ContainerAPIClient) ContainerCreate(context.Context, *container.Config, *container.HostConfig, ...) (container.CreateResponse, error)
- func (c *ContainerAPIClient) ContainerDiff(context.Context, string) ([]container.FilesystemChange, error)
- func (c *ContainerAPIClient) ContainerExecAttach(context.Context, string, container.ExecStartOptions) (types.HijackedResponse, error)
- func (c *ContainerAPIClient) ContainerExecCreate(context.Context, string, container.ExecOptions) (types.IDResponse, error)
- func (c *ContainerAPIClient) ContainerExecInspect(context.Context, string) (container.ExecInspect, error)
- func (c *ContainerAPIClient) ContainerExecResize(context.Context, string, container.ResizeOptions) error
- func (c *ContainerAPIClient) ContainerExecStart(context.Context, string, container.ExecStartOptions) error
- func (c *ContainerAPIClient) ContainerExport(context.Context, string) (io.ReadCloser, error)
- func (c *ContainerAPIClient) ContainerInspect(context.Context, string) (types.ContainerJSON, error)
- func (c *ContainerAPIClient) ContainerInspectWithRaw(context.Context, string, bool) (types.ContainerJSON, []byte, error)
- func (c *ContainerAPIClient) ContainerKill(context.Context, string, string) error
- func (c *ContainerAPIClient) ContainerList(context.Context, container.ListOptions) ([]types.Container, error)
- func (c *ContainerAPIClient) ContainerLogs(context.Context, string, container.LogsOptions) (io.ReadCloser, error)
- func (c *ContainerAPIClient) ContainerPause(context.Context, string) error
- func (c *ContainerAPIClient) ContainerRemove(context.Context, string, container.RemoveOptions) error
- func (c *ContainerAPIClient) ContainerRename(context.Context, string, string) error
- func (c *ContainerAPIClient) ContainerResize(context.Context, string, container.ResizeOptions) error
- func (c *ContainerAPIClient) ContainerRestart(context.Context, string, container.StopOptions) error
- func (c *ContainerAPIClient) ContainerStart(context.Context, string, container.StartOptions) error
- func (c *ContainerAPIClient) ContainerStatPath(context.Context, string, string) (container.PathStat, error)
- func (c *ContainerAPIClient) ContainerStats(context.Context, string, bool) (container.StatsResponseReader, error)
- func (c *ContainerAPIClient) ContainerStatsOneShot(context.Context, string) (container.StatsResponseReader, error)
- func (c *ContainerAPIClient) ContainerStop(context.Context, string, container.StopOptions) error
- func (c *ContainerAPIClient) ContainerTop(context.Context, string, []string) (container.ContainerTopOKBody, error)
- func (c *ContainerAPIClient) ContainerUnpause(context.Context, string) error
- func (c *ContainerAPIClient) ContainerUpdate(context.Context, string, container.UpdateConfig) (container.ContainerUpdateOKBody, error)
- func (c *ContainerAPIClient) ContainerWait(context.Context, string, container.WaitCondition) (<-chan container.WaitResponse, <-chan error)
- func (c *ContainerAPIClient) ContainersPrune(context.Context, filters.Args) (container.PruneReport, error)
- func (c *ContainerAPIClient) CopyFromContainer(context.Context, string, string) (io.ReadCloser, container.PathStat, error)
- func (c *ContainerAPIClient) CopyToContainer(context.Context, string, string, io.Reader, container.CopyToContainerOptions) error
- type ImageAPIClient
- func (c *ImageAPIClient) BuildCachePrune(context.Context, types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error)
- func (c *ImageAPIClient) BuildCancel(context.Context, string) error
- func (c *ImageAPIClient) ImageBuild(context.Context, io.Reader, types.ImageBuildOptions) (types.ImageBuildResponse, error)
- func (c *ImageAPIClient) ImageCreate(context.Context, string, image.CreateOptions) (io.ReadCloser, error)
- func (c *ImageAPIClient) ImageHistory(context.Context, string) ([]image.HistoryResponseItem, error)
- func (c *ImageAPIClient) ImageImport(context.Context, image.ImportSource, string, image.ImportOptions) (io.ReadCloser, error)
- func (c *ImageAPIClient) ImageInspectWithRaw(context.Context, string) (types.ImageInspect, []byte, error)
- func (c *ImageAPIClient) ImageList(context.Context, image.ListOptions) ([]image.Summary, error)
- func (c *ImageAPIClient) ImageLoad(context.Context, io.Reader, bool) (image.LoadResponse, error)
- func (c *ImageAPIClient) ImagePull(context.Context, string, image.PullOptions) (io.ReadCloser, error)
- func (c *ImageAPIClient) ImagePush(context.Context, string, image.PushOptions) (io.ReadCloser, error)
- func (c *ImageAPIClient) ImageRemove(context.Context, string, image.RemoveOptions) ([]image.DeleteResponse, error)
- func (c *ImageAPIClient) ImageSave(context.Context, []string) (io.ReadCloser, error)
- func (c *ImageAPIClient) ImageSearch(context.Context, string, registry.SearchOptions) ([]registry.SearchResult, error)
- func (c *ImageAPIClient) ImageTag(context.Context, string, string) error
- func (c *ImageAPIClient) ImagesPrune(context.Context, filters.Args) (image.PruneReport, error)
- type MockCloser
- type MockReadCloser
- type MockReader
Constants ¶
This section is empty.
Variables ¶
var Err = errors.New("mockdockerclient error")
Err is the canonical error returned by mocks
Functions ¶
This section is empty.
Types ¶
type ContainerAPIClient ¶
type ContainerAPIClient struct { CreateResp *container.CreateResponse StartErr error StopErr error RemoveErr error InspectResp *types.ContainerJSON Logs io.ReadCloser }
ContainerAPIClient is a mock implementation of the Docker's client.ContainerAPIClient interface
func (*ContainerAPIClient) ContainerAttach ¶
func (c *ContainerAPIClient) ContainerAttach(context.Context, string, container.AttachOptions) (types.HijackedResponse, error)
ContainerAttach is a mock implementation of Docker's client.ContainerAPIClient.ContainerAttach()
TODO: properly implement
func (*ContainerAPIClient) ContainerCommit ¶
func (c *ContainerAPIClient) ContainerCommit(context.Context, string, container.CommitOptions) (types.IDResponse, error)
ContainerCommit is a mock implementation of Docker's client.ContainerAPIClient.ContainerCommit()
TODO: properly implement
func (*ContainerAPIClient) ContainerCreate ¶
func (c *ContainerAPIClient) ContainerCreate(context.Context, *container.Config, *container.HostConfig, *network.NetworkingConfig, *v1.Platform, string) (container.CreateResponse, error)
ContainerCreate is a mock implementation of Docker's client.ContainerAPIClient.ContainerCreate()
func (*ContainerAPIClient) ContainerDiff ¶
func (c *ContainerAPIClient) ContainerDiff(context.Context, string) ([]container.FilesystemChange, error)
ContainerDiff is a mock implementation of Docker's client.ContainerAPIClient.ContainerDiff()
TODO: properly implement
func (*ContainerAPIClient) ContainerExecAttach ¶
func (c *ContainerAPIClient) ContainerExecAttach(context.Context, string, container.ExecStartOptions) (types.HijackedResponse, error)
ContainerExecAttach is a mock implementation of Docker's client.ContainerAPIClient.ContainerExecAttach()
TODO: properly implement
func (*ContainerAPIClient) ContainerExecCreate ¶
func (c *ContainerAPIClient) ContainerExecCreate(context.Context, string, container.ExecOptions) (types.IDResponse, error)
ContainerExecCreate is a mock implementation of Docker's client.ContainerAPIClient.ContainerExecCreate()
TODO: properly implement
func (*ContainerAPIClient) ContainerExecInspect ¶
func (c *ContainerAPIClient) ContainerExecInspect(context.Context, string) (container.ExecInspect, error)
ContainerExecInspect is a mock implementation of Docker's client.ContainerAPIClient.ContainerExecInspect()
TODO: properly implement
func (*ContainerAPIClient) ContainerExecResize ¶
func (c *ContainerAPIClient) ContainerExecResize(context.Context, string, container.ResizeOptions) error
ContainerExecResize is a mock implementation of Docker's client.ContainerAPIClient.ContainerExecResize()
TODO: properly implement
func (*ContainerAPIClient) ContainerExecStart ¶
func (c *ContainerAPIClient) ContainerExecStart(context.Context, string, container.ExecStartOptions) error
ContainerExecStart is a mock implementation of Docker's client.ContainerAPIClient.ContainerExecStart()
TODO: properly implement
func (*ContainerAPIClient) ContainerExport ¶
func (c *ContainerAPIClient) ContainerExport(context.Context, string) (io.ReadCloser, error)
ContainerExport is a mock implementation of Docker's client.ContainerAPIClient.ContainerExport()
TODO: properly implement
func (*ContainerAPIClient) ContainerInspect ¶
func (c *ContainerAPIClient) ContainerInspect(context.Context, string) (types.ContainerJSON, error)
ContainerInspect is a mock implementation of Docker's client.ContainerAPIClient.ContainerInspect()
func (*ContainerAPIClient) ContainerInspectWithRaw ¶
func (c *ContainerAPIClient) ContainerInspectWithRaw(context.Context, string, bool) (types.ContainerJSON, []byte, error)
ContainerInspectWithRaw is a mock implementation of Docker's client.ContainerAPIClient.ContainerInspectWithRaw()
TODO: properly implement
func (*ContainerAPIClient) ContainerKill ¶
ContainerKill is a mock implementation of Docker's client.ContainerAPIClient.ContainerKill()
TODO: properly implement
func (*ContainerAPIClient) ContainerList ¶
func (c *ContainerAPIClient) ContainerList(context.Context, container.ListOptions) ([]types.Container, error)
ContainerList is a mock implementation of Docker's client.ContainerAPIClient.ContainerList()
TODO: properly implement
func (*ContainerAPIClient) ContainerLogs ¶
func (c *ContainerAPIClient) ContainerLogs(context.Context, string, container.LogsOptions) (io.ReadCloser, error)
ContainerLogs is a mock implementation of Docker's client.ContainerAPIClient.ContainerLogs()
func (*ContainerAPIClient) ContainerPause ¶
func (c *ContainerAPIClient) ContainerPause(context.Context, string) error
ContainerPause is a mock implementation of Docker's client.ContainerAPIClient.ContainerPause()
TODO: properly implement
func (*ContainerAPIClient) ContainerRemove ¶
func (c *ContainerAPIClient) ContainerRemove(context.Context, string, container.RemoveOptions) error
ContainerRemove is a mock implementation of Docker's client.ContainerAPIClient.ContainerRemove()
func (*ContainerAPIClient) ContainerRename ¶
ContainerRename is a mock implementation of Docker's client.ContainerAPIClient.ContainerRename()
TODO: properly implement
func (*ContainerAPIClient) ContainerResize ¶
func (c *ContainerAPIClient) ContainerResize(context.Context, string, container.ResizeOptions) error
ContainerResize is a mock implementation of Docker's client.ContainerAPIClient.ContainerResize()
TODO: properly implement
func (*ContainerAPIClient) ContainerRestart ¶
func (c *ContainerAPIClient) ContainerRestart(context.Context, string, container.StopOptions) error
ContainerRestart is a mock implementation of Docker's client.ContainerAPIClient.ContainerRestart()
TODO: properly implement
func (*ContainerAPIClient) ContainerStart ¶
func (c *ContainerAPIClient) ContainerStart(context.Context, string, container.StartOptions) error
ContainerStart is a mock implementation of Docker's client.ContainerAPIClient.ContainerStart()
func (*ContainerAPIClient) ContainerStatPath ¶
func (c *ContainerAPIClient) ContainerStatPath(context.Context, string, string) (container.PathStat, error)
ContainerStatPath is a mock implementation of Docker's client.ContainerAPIClient.ContainerStatPath()
TODO: properly implement
func (*ContainerAPIClient) ContainerStats ¶
func (c *ContainerAPIClient) ContainerStats(context.Context, string, bool) (container.StatsResponseReader, error)
ContainerStats is a mock implementation of Docker's client.ContainerAPIClient.ContainerStats()
TODO: properly implement
func (*ContainerAPIClient) ContainerStatsOneShot ¶ added in v0.3.6
func (c *ContainerAPIClient) ContainerStatsOneShot(context.Context, string) (container.StatsResponseReader, error)
ContainerStatsOneShot is a mock implementation of Docker's client.ContainerAPIClient.ContainerStatsOneShot()
TODO: properly implement
func (*ContainerAPIClient) ContainerStop ¶
func (c *ContainerAPIClient) ContainerStop(context.Context, string, container.StopOptions) error
ContainerStop is a mock implementation of Docker's client.ContainerAPIClient.ContainerStop()
func (*ContainerAPIClient) ContainerTop ¶
func (c *ContainerAPIClient) ContainerTop(context.Context, string, []string) (container.ContainerTopOKBody, error)
ContainerTop is a mock implementation of Docker's client.ContainerAPIClient.ContainerTop()
TODO: properly implement
func (*ContainerAPIClient) ContainerUnpause ¶
func (c *ContainerAPIClient) ContainerUnpause(context.Context, string) error
ContainerUnpause is a mock implementation of Docker's client.ContainerAPIClient.ContainerUnpause()
TODO: properly implement
func (*ContainerAPIClient) ContainerUpdate ¶
func (c *ContainerAPIClient) ContainerUpdate(context.Context, string, container.UpdateConfig) (container.ContainerUpdateOKBody, error)
ContainerUpdate is a mock implementation of Docker's client.ContainerAPIClient.ContainerUpdate()
TODO: properly implement
func (*ContainerAPIClient) ContainerWait ¶
func (c *ContainerAPIClient) ContainerWait(context.Context, string, container.WaitCondition) (<-chan container.WaitResponse, <-chan error)
ContainerWait is a mock implementation of Docker's client.ContainerAPIClient.ContainerWait()
TODO: properly implement
func (*ContainerAPIClient) ContainersPrune ¶
func (c *ContainerAPIClient) ContainersPrune(context.Context, filters.Args) (container.PruneReport, error)
ContainersPrune is a mock implementation of Docker's client.ContainerAPIClient.ContainersPrune()
TODO: properly implement
func (*ContainerAPIClient) CopyFromContainer ¶
func (c *ContainerAPIClient) CopyFromContainer(context.Context, string, string) (io.ReadCloser, container.PathStat, error)
CopyFromContainer is a mock implementation of Docker's client.ContainerAPIClient.CopyFromContainer()
TODO: properly implement
func (*ContainerAPIClient) CopyToContainer ¶
func (c *ContainerAPIClient) CopyToContainer(context.Context, string, string, io.Reader, container.CopyToContainerOptions) error
CopyToContainer is a mock implementation of Docker's client.ContainerAPIClient.CopyToContainer()
TODO: properly implement
type ImageAPIClient ¶
type ImageAPIClient struct {
PullResp io.ReadCloser
}
ImageAPIClient is a mock implementation of the Docker's client.ImageAPIClient interface
func (*ImageAPIClient) BuildCachePrune ¶
func (c *ImageAPIClient) BuildCachePrune(context.Context, types.BuildCachePruneOptions) (*types.BuildCachePruneReport, error)
BuildCachePrune is a mock implementation of Docker's client.ImageAPIClient.BuildCachePrune()
TODO: properly implement
func (*ImageAPIClient) BuildCancel ¶
func (c *ImageAPIClient) BuildCancel(context.Context, string) error
BuildCancel is a mock implementation of Docker's client.ImageAPIClient.BuildCancel()
TODO: properly implement
func (*ImageAPIClient) ImageBuild ¶
func (c *ImageAPIClient) ImageBuild(context.Context, io.Reader, types.ImageBuildOptions) (types.ImageBuildResponse, error)
ImageBuild is a mock implementation of Docker's client.ImageAPIClient.ImageBuild()
TODO: properly implement
func (*ImageAPIClient) ImageCreate ¶
func (c *ImageAPIClient) ImageCreate(context.Context, string, image.CreateOptions) (io.ReadCloser, error)
ImageCreate is a mock implementation of Docker's client.ImageAPIClient.ImageCreate()
TODO: properly implement
func (*ImageAPIClient) ImageHistory ¶
func (c *ImageAPIClient) ImageHistory(context.Context, string) ([]image.HistoryResponseItem, error)
ImageHistory is a mock implementation of Docker's client.ImageAPIClient.ImageHistory()
TODO: properly implement
func (*ImageAPIClient) ImageImport ¶
func (c *ImageAPIClient) ImageImport(context.Context, image.ImportSource, string, image.ImportOptions) (io.ReadCloser, error)
ImageImport is a mock implementation of Docker's client.ImageAPIClient.ImageImport()
TODO: properly implement
func (*ImageAPIClient) ImageInspectWithRaw ¶
func (c *ImageAPIClient) ImageInspectWithRaw(context.Context, string) (types.ImageInspect, []byte, error)
ImageInspectWithRaw is a mock implementation of Docker's client.ImageAPIClient.ImageInspectWithRaw()
TODO: properly implement
func (*ImageAPIClient) ImageList ¶
func (c *ImageAPIClient) ImageList(context.Context, image.ListOptions) ([]image.Summary, error)
ImageList is a mock implementation of Docker's client.ImageAPIClient.ImageList()
TODO: properly implement
func (*ImageAPIClient) ImageLoad ¶
func (c *ImageAPIClient) ImageLoad(context.Context, io.Reader, bool) (image.LoadResponse, error)
ImageLoad is a mock implementation of Docker's client.ImageAPIClient.ImageLoad()
TODO: properly implement
func (*ImageAPIClient) ImagePull ¶
func (c *ImageAPIClient) ImagePull(context.Context, string, image.PullOptions) (io.ReadCloser, error)
ImagePull is a mock implementation of Docker's client.ImageAPIClient.ImagePull()
func (*ImageAPIClient) ImagePush ¶
func (c *ImageAPIClient) ImagePush(context.Context, string, image.PushOptions) (io.ReadCloser, error)
ImagePush is a mock implementation of Docker's client.ImageAPIClient.ImagePush()
TODO: properly implement
func (*ImageAPIClient) ImageRemove ¶
func (c *ImageAPIClient) ImageRemove(context.Context, string, image.RemoveOptions) ([]image.DeleteResponse, error)
ImageRemove is a mock implementation of Docker's client.ImageAPIClient.ImageRemove()
TODO: properly implement
func (*ImageAPIClient) ImageSave ¶
func (c *ImageAPIClient) ImageSave(context.Context, []string) (io.ReadCloser, error)
ImageSave is a mock implementation of Docker's client.ImageAPIClient.ImageSave()
TODO: properly implement
func (*ImageAPIClient) ImageSearch ¶
func (c *ImageAPIClient) ImageSearch(context.Context, string, registry.SearchOptions) ([]registry.SearchResult, error)
ImageSearch is a mock implementation of Docker's client.ImageAPIClient.ImageSearch()
TODO: properly implement
func (*ImageAPIClient) ImageTag ¶
ImageTag is a mock implementation of Docker's client.ImageAPIClient.ImageTag()
TODO: properly implement
func (*ImageAPIClient) ImagesPrune ¶
func (c *ImageAPIClient) ImagesPrune(context.Context, filters.Args) (image.PruneReport, error)
ImagesPrune is a mock implementation of Docker's client.ImageAPIClient.ImagesPrune()
TODO: properly implement
type MockCloser ¶
type MockCloser struct {
Err error
}
MockCloser is a mock implementation of the io.Closer interface
func (MockCloser) Close ¶
func (c MockCloser) Close() error
Close is a mock implementation of io.Closer.Close()
type MockReadCloser ¶
type MockReadCloser struct { MockReader MockCloser }
MockReadCloser is a mock implementation of the io.ReadCloser interface
type MockReader ¶
MockReader is a mock implementation of the io.Reader interface