mockdockerclient

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package mockdockerclient provides mocks for the Docker client github.com/docker/docker/client

Index

Constants

This section is empty.

Variables

View Source
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

ContainerAttach is a mock implementation of Docker's client.ContainerAPIClient.ContainerAttach()

TODO: properly implement

func (*ContainerAPIClient) ContainerCommit

ContainerCommit is a mock implementation of Docker's client.ContainerAPIClient.ContainerCommit()

TODO: properly implement

func (*ContainerAPIClient) ContainerCreate

ContainerCreate is a mock implementation of Docker's client.ContainerAPIClient.ContainerCreate()

func (*ContainerAPIClient) ContainerDiff

ContainerDiff is a mock implementation of Docker's client.ContainerAPIClient.ContainerDiff()

TODO: properly implement

func (*ContainerAPIClient) ContainerExecAttach

ContainerExecAttach is a mock implementation of Docker's client.ContainerAPIClient.ContainerExecAttach()

TODO: properly implement

func (*ContainerAPIClient) ContainerExecCreate

ContainerExecCreate is a mock implementation of Docker's client.ContainerAPIClient.ContainerExecCreate()

TODO: properly implement

func (*ContainerAPIClient) ContainerExecInspect

ContainerExecInspect is a mock implementation of Docker's client.ContainerAPIClient.ContainerExecInspect()

TODO: properly implement

func (*ContainerAPIClient) ContainerExecResize

func (c *ContainerAPIClient) ContainerExecResize(context.Context, string,
	types.ResizeOptions) error

ContainerExecResize is a mock implementation of Docker's client.ContainerAPIClient.ContainerExecResize()

TODO: properly implement

func (*ContainerAPIClient) ContainerExecStart

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

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

func (c *ContainerAPIClient) ContainerKill(context.Context, string, string) error

ContainerKill is a mock implementation of Docker's client.ContainerAPIClient.ContainerKill()

TODO: properly implement

func (*ContainerAPIClient) ContainerList

ContainerList is a mock implementation of Docker's client.ContainerAPIClient.ContainerList()

TODO: properly implement

func (*ContainerAPIClient) ContainerLogs

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

ContainerRemove is a mock implementation of Docker's client.ContainerAPIClient.ContainerRemove()

func (*ContainerAPIClient) ContainerRename

func (c *ContainerAPIClient) ContainerRename(context.Context, string, string) error

ContainerRename is a mock implementation of Docker's client.ContainerAPIClient.ContainerRename()

TODO: properly implement

func (*ContainerAPIClient) ContainerResize

ContainerResize is a mock implementation of Docker's client.ContainerAPIClient.ContainerResize()

TODO: properly implement

func (*ContainerAPIClient) ContainerRestart

ContainerRestart is a mock implementation of Docker's client.ContainerAPIClient.ContainerRestart()

TODO: properly implement

func (*ContainerAPIClient) ContainerStart

ContainerStart is a mock implementation of Docker's client.ContainerAPIClient.ContainerStart()

func (*ContainerAPIClient) ContainerStatPath

ContainerStatPath is a mock implementation of Docker's client.ContainerAPIClient.ContainerStatPath()

TODO: properly implement

func (*ContainerAPIClient) ContainerStats

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) (types.ContainerStats, error)

ContainerStatsOneShot is a mock implementation of Docker's client.ContainerAPIClient.ContainerStatsOneShot()

TODO: properly implement

func (*ContainerAPIClient) ContainerStop

ContainerStop is a mock implementation of Docker's client.ContainerAPIClient.ContainerStop()

func (*ContainerAPIClient) ContainerTop

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

ContainerUpdate is a mock implementation of Docker's client.ContainerAPIClient.ContainerUpdate()

TODO: properly implement

func (*ContainerAPIClient) ContainerWait

ContainerWait is a mock implementation of Docker's client.ContainerAPIClient.ContainerWait()

TODO: properly implement

func (*ContainerAPIClient) ContainersPrune

ContainersPrune is a mock implementation of Docker's client.ContainerAPIClient.ContainersPrune()

TODO: properly implement

func (*ContainerAPIClient) CopyFromContainer

CopyFromContainer is a mock implementation of Docker's client.ContainerAPIClient.CopyFromContainer()

TODO: properly implement

func (*ContainerAPIClient) CopyToContainer

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

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

ImageBuild is a mock implementation of Docker's client.ImageAPIClient.ImageBuild()

TODO: properly implement

func (*ImageAPIClient) ImageCreate

ImageCreate is a mock implementation of Docker's client.ImageAPIClient.ImageCreate()

TODO: properly implement

func (*ImageAPIClient) ImageHistory

ImageHistory is a mock implementation of Docker's client.ImageAPIClient.ImageHistory()

TODO: properly implement

func (*ImageAPIClient) ImageImport

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

ImageList is a mock implementation of Docker's client.ImageAPIClient.ImageList()

TODO: properly implement

func (*ImageAPIClient) ImageLoad

ImageLoad is a mock implementation of Docker's client.ImageAPIClient.ImageLoad()

TODO: properly implement

func (*ImageAPIClient) ImagePull

ImagePull is a mock implementation of Docker's client.ImageAPIClient.ImagePull()

func (*ImageAPIClient) ImagePush

ImagePush is a mock implementation of Docker's client.ImageAPIClient.ImagePush()

TODO: properly implement

func (*ImageAPIClient) ImageRemove

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

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

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

type MockReader struct {
	N   int
	Err error
}

MockReader is a mock implementation of the io.Reader interface

func (MockReader) Read

func (r MockReader) Read(_ []byte) (n int, err error)

Read is a mock implementation of io.Reader.Read()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL