client

package
v1.10.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	ContainerCreate(ctx context.Context, config *containertypes.Config, hostConfig *containertypes.HostConfig,
		networkingConfig *networktypes.NetworkingConfig, platform *specs.Platform, containerName string) (
		containertypes.ContainerCreateCreatedBody, error)
	ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error
	ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error)
	ContainerWait(ctx context.Context, containerID string, condition containertypes.WaitCondition) (
		<-chan containertypes.ContainerWaitOKBody, <-chan error)
	ContainerLogs(ctx context.Context, containerID string, options types.ContainerLogsOptions) (io.ReadCloser, error)
	ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error
	ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error)
	ImagePull(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, error)
	Ping(ctx context.Context) (types.Ping, error)
}

func NewDockerClient

func NewDockerClient() Interface

type Mock

type Mock struct {
	mock.Mock
}

func (*Mock) ContainerList

func (m *Mock) ContainerList(_ context.Context, _ types.ContainerListOptions) ([]types.Container, error)

func (*Mock) ContainerLogs

func (m *Mock) ContainerLogs(_ context.Context, _ string, _ types.ContainerLogsOptions) (io.ReadCloser, error)

func (*Mock) ContainerRemove

func (m *Mock) ContainerRemove(_ context.Context, _ string, _ types.ContainerRemoveOptions) error

func (*Mock) ContainerStart

func (m *Mock) ContainerStart(_ context.Context, _ string, _ types.ContainerStartOptions) error

func (*Mock) ContainerWait

func (m *Mock) ContainerWait(_ context.Context, _ string, _ containertypes.WaitCondition) (
	<-chan containertypes.ContainerWaitOKBody, <-chan error)

func (*Mock) ImageList

func (*Mock) ImagePull

func (m *Mock) ImagePull(_ context.Context, _ string, _ types.ImagePullOptions) (io.ReadCloser, error)

func (*Mock) Ping

func (m *Mock) Ping(_ context.Context) (types.Ping, error)

Jump to

Keyboard shortcuts

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