Versions in this module Expand all Collapse all v1 v1.1.0 Mar 14, 2022 v1.0.0 Jun 3, 2021 v0 v0.9.0 Jun 23, 2020 Changes in this version + const FakeDockerEndpoint + const MinimumDockerAPIVersion + const StatusCreatedPrefix + const StatusExitedPrefix + const StatusRunningPrefix + func GetFakeContainerID(name string) string + func IsContainerNotFoundError(err error) bool + func IsImageNotFoundError(err error) bool + func NewCalledDetail(name string, arguments []interface{}) calledDetail + func ParseDockerTimestamp(s string) (time.Time, error) + type FakeContainer struct + Config *dockercontainer.Config + CreatedAt time.Time + ExitCode int + FinishedAt time.Time + HostConfig *dockercontainer.HostConfig + ID string + Name string + Pid int + Running bool + StartedAt time.Time + type FakeDockerClient struct + Clock clock.Clock + ContainerMap map[string]*dockertypes.ContainerJSON + Created []string + EnableSleep bool + EnableTrace bool + Errors map[string]error + ExecInspect *dockertypes.ContainerExecInspect + ExitedContainerList []dockertypes.Container + ImageHistoryMap map[string][]dockerimagetypes.HistoryResponseItem + ImageIDsNeedingAuth map[string]dockertypes.AuthConfig + ImageInspects map[string]*dockertypes.ImageInspect + Images []dockertypes.ImageSummary + ImagesPulled []string + Information dockertypes.Info + RandGenerator *rand.Rand + Removed []string + RunningContainerList []dockertypes.Container + Started []string + Stopped []string + VersionInfo dockertypes.Version + func NewFakeDockerClient() *FakeDockerClient + func (f *FakeDockerClient) AssertCallDetails(calls ...calledDetail) (err error) + func (f *FakeDockerClient) AssertCalls(calls []string) (err error) + func (f *FakeDockerClient) AssertCreatedByName(created []string) error + func (f *FakeDockerClient) AssertCreatedByNameWithOrder(created []string) error + func (f *FakeDockerClient) AssertImagesPulled(pulled []string) error + func (f *FakeDockerClient) AssertImagesPulledMsgs(expected []string) error + func (f *FakeDockerClient) AssertStopped(stopped []string) error + func (f *FakeDockerClient) AssertStoppedByName(stopped []string) error + func (f *FakeDockerClient) AttachToContainer(id string, opts dockertypes.ContainerAttachOptions, sopts StreamOptions) error + func (f *FakeDockerClient) ClearCalls() + func (f *FakeDockerClient) ClearErrors() + func (f *FakeDockerClient) CreateContainer(c dockertypes.ContainerCreateConfig) (*dockercontainer.ContainerCreateCreatedBody, error) + func (f *FakeDockerClient) CreateExec(id string, opts dockertypes.ExecConfig) (*dockertypes.IDResponse, error) + func (f *FakeDockerClient) GetContainerStats(id string) (*dockertypes.StatsJSON, error) + func (f *FakeDockerClient) ImageHistory(id string) ([]dockerimagetypes.HistoryResponseItem, error) + func (f *FakeDockerClient) Info() (*dockertypes.Info, error) + func (f *FakeDockerClient) InjectError(fn string, err error) + func (f *FakeDockerClient) InjectErrors(errs map[string]error) + func (f *FakeDockerClient) InjectImageHistory(data map[string][]dockerimagetypes.HistoryResponseItem) + func (f *FakeDockerClient) InjectImageInspects(inspects []dockertypes.ImageInspect) + func (f *FakeDockerClient) InjectImages(images []dockertypes.ImageSummary) + func (f *FakeDockerClient) InspectContainer(id string) (*dockertypes.ContainerJSON, error) + func (f *FakeDockerClient) InspectContainerWithSize(id string) (*dockertypes.ContainerJSON, error) + func (f *FakeDockerClient) InspectExec(id string) (*dockertypes.ContainerExecInspect, error) + func (f *FakeDockerClient) InspectImageByID(name string) (*dockertypes.ImageInspect, error) + func (f *FakeDockerClient) InspectImageByRef(name string) (*dockertypes.ImageInspect, error) + func (f *FakeDockerClient) ListContainers(options dockertypes.ContainerListOptions) ([]dockertypes.Container, error) + func (f *FakeDockerClient) ListImages(opts dockertypes.ImageListOptions) ([]dockertypes.ImageSummary, error) + func (f *FakeDockerClient) Logs(id string, opts dockertypes.ContainerLogsOptions, sopts StreamOptions) error + func (f *FakeDockerClient) MakeImagesPrivate(images []dockertypes.ImageSummary, auth dockertypes.AuthConfig) + func (f *FakeDockerClient) PullImage(image string, auth dockertypes.AuthConfig, opts dockertypes.ImagePullOptions) error + func (f *FakeDockerClient) RemoveContainer(id string, opts dockertypes.ContainerRemoveOptions) error + func (f *FakeDockerClient) RemoveImage(image string, opts dockertypes.ImageRemoveOptions) ([]dockertypes.ImageDeleteResponseItem, error) + func (f *FakeDockerClient) ResetImages() + func (f *FakeDockerClient) ResizeContainerTTY(id string, height, width uint) error + func (f *FakeDockerClient) ResizeExecTTY(id string, height, width uint) error + func (f *FakeDockerClient) SetFakeContainers(containers []*FakeContainer) + func (f *FakeDockerClient) SetFakeRunningContainers(containers []*FakeContainer) + func (f *FakeDockerClient) StartContainer(id string) error + func (f *FakeDockerClient) StartExec(startExec string, opts dockertypes.ExecStartCheck, sopts StreamOptions) error + func (f *FakeDockerClient) StopContainer(id string, timeout time.Duration) error + func (f *FakeDockerClient) UpdateContainerResources(id string, updateConfig dockercontainer.UpdateConfig) error + func (f *FakeDockerClient) Version() (*dockertypes.Version, error) + func (f *FakeDockerClient) WithClock(c clock.Clock) *FakeDockerClient + func (f *FakeDockerClient) WithRandSource(source rand.Source) *FakeDockerClient + func (f *FakeDockerClient) WithTraceDisabled() *FakeDockerClient + func (f *FakeDockerClient) WithVersion(version, apiVersion string) *FakeDockerClient + type FakeDockerPuller struct + func (f *FakeDockerPuller) GetImageRef(image string) (string, error) + func (f *FakeDockerPuller) Pull(image string, _ []v1.Secret) error + type ImageNotFoundError struct + ID string + func (e ImageNotFoundError) Error() string + type Interface interface + AttachToContainer func(string, dockertypes.ContainerAttachOptions, StreamOptions) error + CreateContainer func(dockertypes.ContainerCreateConfig) (*dockercontainer.ContainerCreateCreatedBody, error) + CreateExec func(string, dockertypes.ExecConfig) (*dockertypes.IDResponse, error) + GetContainerStats func(id string) (*dockertypes.StatsJSON, error) + ImageHistory func(id string) ([]dockerimagetypes.HistoryResponseItem, error) + Info func() (*dockertypes.Info, error) + InspectContainer func(id string) (*dockertypes.ContainerJSON, error) + InspectContainerWithSize func(id string) (*dockertypes.ContainerJSON, error) + InspectExec func(id string) (*dockertypes.ContainerExecInspect, error) + InspectImageByID func(imageID string) (*dockertypes.ImageInspect, error) + InspectImageByRef func(imageRef string) (*dockertypes.ImageInspect, error) + ListContainers func(options dockertypes.ContainerListOptions) ([]dockertypes.Container, error) + ListImages func(opts dockertypes.ImageListOptions) ([]dockertypes.ImageSummary, error) + Logs func(string, dockertypes.ContainerLogsOptions, StreamOptions) error + PullImage func(image string, auth dockertypes.AuthConfig, opts dockertypes.ImagePullOptions) error + RemoveContainer func(id string, opts dockertypes.ContainerRemoveOptions) error + RemoveImage func(image string, opts dockertypes.ImageRemoveOptions) ([]dockertypes.ImageDeleteResponseItem, error) + ResizeContainerTTY func(id string, height, width uint) error + ResizeExecTTY func(id string, height, width uint) error + StartContainer func(id string) error + StartExec func(string, dockertypes.ExecStartCheck, StreamOptions) error + StopContainer func(id string, timeout time.Duration) error + UpdateContainerResources func(id string, updateConfig dockercontainer.UpdateConfig) error + Version func() (*dockertypes.Version, error) + func ConnectToDockerOrDie(dockerEndpoint string, requestTimeout, imagePullProgressDeadline time.Duration, ...) Interface + func NewInstrumentedInterface(dockerClient Interface) Interface + type StreamOptions struct + ErrorStream io.Writer + ExecStarted chan struct{} + InputStream io.Reader + OutputStream io.Writer + RawTerminal bool