dockerfake

package
v0.0.0-...-0f74808 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package dockerfake contains logic for mocking out Docker-related functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	ImagePullFn            func(_ context.Context, ref string, options dockertypes.ImagePullOptions) (io.ReadCloser, error)
	ContainerCreateFn      func(_ context.Context, config *containertypes.Config, hostConfig *containertypes.HostConfig, networkingConfig *networktypes.NetworkingConfig, _ *specs.Platform, containerName string) (containertypes.ContainerCreateCreatedBody, error)
	ImagePruneFn           func(_ context.Context, pruneFilter filters.Args) (dockertypes.ImagesPruneReport, error)
	ContainerStartFn       func(_ context.Context, container string, options dockertypes.ContainerStartOptions) error
	ContainerExecAttachFn  func(_ context.Context, execID string, config dockertypes.ExecStartCheck) (dockertypes.HijackedResponse, error)
	ContainerExecCreateFn  func(_ context.Context, container string, config dockertypes.ExecConfig) (dockertypes.IDResponse, error)
	ContainerExecStartFn   func(_ context.Context, execID string, config dockertypes.ExecStartCheck) error
	ContainerExecInspectFn func(_ context.Context, execID string) (dockertypes.ContainerExecInspect, error)
	ContainerInspectFn     func(_ context.Context, container string) (dockertypes.ContainerJSON, error)
	ContainerRemoveFn      func(_ context.Context, container string, options dockertypes.ContainerRemoveOptions) error
	PingFn                 func(_ context.Context) (dockertypes.Ping, error)
}

MockClient provides overrides for functions that are called in envbox.

func (MockClient) BuildCancel

func (MockClient) BuildCancel(_ context.Context, _ string) error

func (MockClient) ContainerCreate

func (m MockClient) ContainerCreate(ctx context.Context, config *containertypes.Config, hostConfig *containertypes.HostConfig, networkingConfig *networktypes.NetworkingConfig, pspecs *specs.Platform, containerName string) (containertypes.ContainerCreateCreatedBody, error)

func (MockClient) ContainerExecAttach

func (m MockClient) ContainerExecAttach(ctx context.Context, execID string, config dockertypes.ExecStartCheck) (dockertypes.HijackedResponse, error)

func (MockClient) ContainerExecCreate

func (m MockClient) ContainerExecCreate(ctx context.Context, name string, config dockertypes.ExecConfig) (dockertypes.IDResponse, error)

func (MockClient) ContainerExecInspect

func (m MockClient) ContainerExecInspect(ctx context.Context, id string) (dockertypes.ContainerExecInspect, error)

func (MockClient) ContainerExecResize

func (MockClient) ContainerExecResize(_ context.Context, _ string, _ dockertypes.ResizeOptions) error

func (MockClient) ContainerExecStart

func (m MockClient) ContainerExecStart(ctx context.Context, execID string, config dockertypes.ExecStartCheck) error

func (MockClient) ContainerExport

func (MockClient) ContainerExport(_ context.Context, _ string) (io.ReadCloser, error)

func (MockClient) ContainerInspect

func (m MockClient) ContainerInspect(ctx context.Context, name string) (dockertypes.ContainerJSON, error)

func (MockClient) ContainerInspectWithRaw

func (MockClient) ContainerInspectWithRaw(_ context.Context, _ string, _ bool) (dockertypes.ContainerJSON, []byte, error)

func (MockClient) ContainerKill

func (MockClient) ContainerKill(_ context.Context, _ string, _ string) error

func (MockClient) ContainerLogs

func (MockClient) ContainerPause

func (MockClient) ContainerPause(_ context.Context, _ string) error

func (MockClient) ContainerRemove

func (m MockClient) ContainerRemove(ctx context.Context, name string, options dockertypes.ContainerRemoveOptions) error

func (MockClient) ContainerRename

func (MockClient) ContainerRename(_ context.Context, _ string, _ string) error

func (MockClient) ContainerResize

func (MockClient) ContainerResize(_ context.Context, _ string, _ dockertypes.ResizeOptions) error

func (MockClient) ContainerRestart

func (MockClient) ContainerRestart(_ context.Context, _ string, _ containertypes.StopOptions) error

func (MockClient) ContainerStart

func (m MockClient) ContainerStart(ctx context.Context, name string, options dockertypes.ContainerStartOptions) error

func (MockClient) ContainerStatPath

func (MockClient) ContainerStatPath(_ context.Context, _ string, _ string) (dockertypes.ContainerPathStat, error)

func (MockClient) ContainerStats

func (MockClient) ContainerStats(_ context.Context, _ string, _ bool) (dockertypes.ContainerStats, error)

func (MockClient) ContainerStatsOneShot

func (MockClient) ContainerStatsOneShot(_ context.Context, _ string) (dockertypes.ContainerStats, error)

func (MockClient) ContainerStop

func (MockClient) ContainerTop

func (MockClient) ContainerUnpause

func (MockClient) ContainerUnpause(_ context.Context, _ string) error

func (MockClient) ContainerWait

func (MockClient) ContainersPrune

func (MockClient) CopyFromContainer

func (MockClient) CopyToContainer

func (MockClient) Events

func (MockClient) Events(_ context.Context, _ dockertypes.EventsOptions) (<-chan events.Message, <-chan error)

func (MockClient) ImageCreate

func (MockClient) ImageHistory

func (MockClient) ImageInspectWithRaw

func (MockClient) ImageInspectWithRaw(_ context.Context, _ string) (dockertypes.ImageInspect, []byte, error)

func (MockClient) ImageLoad

func (MockClient) ImagePull

func (m MockClient) ImagePull(ctx context.Context, ref string, options dockertypes.ImagePullOptions) (io.ReadCloser, error)

func (MockClient) ImagePush

func (MockClient) ImageSave

func (MockClient) ImageSave(_ context.Context, _ []string) (io.ReadCloser, error)

func (MockClient) ImageTag

func (MockClient) ImageTag(_ context.Context, _ string, _ string) error

func (MockClient) ImagesPrune

func (m MockClient) ImagesPrune(ctx context.Context, pruneFilter filters.Args) (dockertypes.ImagesPruneReport, error)

func (MockClient) Info

func (MockClient) Ping

Jump to

Keyboard shortcuts

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