mockdockerclient

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package mockdockerclient provides mocks for the Docker client github.com/moby/moby/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  *client.ContainerCreateResult
	StartErr    error
	StopErr     error
	RemoveErr   error
	InspectResp *client.ContainerInspectResult
	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) ContainerExport

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) ContainerKill

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

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

TODO: properly implement

func (*ContainerAPIClient) ContainerPrune

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

TODO: properly implement

func (*ContainerAPIClient) ContainerRemove

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

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) 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

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) 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 *MockImagePullResponse
}

ImageAPIClient is a mock implementation of the Docker's client.ImageAPIClient interface

func (*ImageAPIClient) ImageAttestations

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

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) ImageInspect

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

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) ImagePrune

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

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

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() (via RegistrySearchClient)

TODO: properly implement

func (*ImageAPIClient) ImageTag

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

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 MockImagePullResponse

type MockImagePullResponse struct {
	io.ReadCloser
}

MockImagePullResponse is a mock implementation of the client.ImagePullResponse interface

func (*MockImagePullResponse) JSONMessages

JSONMessages implements client.ImagePullResponse

func (*MockImagePullResponse) Wait

Wait implements client.ImagePullResponse

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