Documentation ¶
Index ¶
- Variables
- type MockClient
- func (m MockClient) ContainerCreate(ctx context.Context, config *container.Config, ...) (container.CreateResponse, error)
- func (m MockClient) ContainerExecCreate(ctx context.Context, container string, config container.ExecOptions) (types.IDResponse, error)
- func (m MockClient) ContainerExecInspect(ctx context.Context, execID string) (container.ExecInspect, error)
- func (m MockClient) ContainerExecStart(ctx context.Context, execID string, config container.ExecStartOptions) error
- func (m MockClient) ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error)
- func (m MockClient) ContainerRemove(ctx context.Context, container string, options container.RemoveOptions) error
- func (m MockClient) ContainerStart(ctx context.Context, container string, options container.StartOptions) error
- func (m MockClient) ContainerStop(ctx context.Context, container string, options container.StopOptions) error
- func (m MockClient) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, container.PathStat, error)
- func (m MockClient) ImageList(ctx context.Context, options image.ListOptions) ([]image.Summary, error)
- func (m MockClient) ImagePull(ctx context.Context, refStr string, options image.PullOptions) (io.ReadCloser, error)
- func (m MockClient) Info(ctx context.Context) (system.Info, error)
- func (m MockClient) ServerVersion(ctx context.Context) (types.Version, error)
- func (m MockClient) VolumeInspect(ctx context.Context, volumeID string) (volume.Volume, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultContainerInspect = types.ContainerJSON{ NetworkSettings: &types.NetworkSettings{ NetworkSettingsBase: types.NetworkSettingsBase{ Ports: map[nat.Port][]nat.PortBinding{ "12345": {{ HostIP: "0.0.0.0", HostPort: "12345", }}, }, }, }, }
View Source
var DefaultServerVersion = types.Version{ Version: "version", Arch: "arch", Platform: struct{ Name string }{Name: "platform name"}, }
Functions ¶
This section is empty.
Types ¶
type MockClient ¶
type MockClient struct { FnContainerCreate func(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *ocispec.Platform, containerName string) (container.CreateResponse, error) FnContainerInspect func(ctx context.Context, containerID string) (types.ContainerJSON, error) FnContainerRemove func(ctx context.Context, container string, options container.RemoveOptions) error FnContainerStart func(ctx context.Context, container string, options container.StartOptions) error FnContainerStop func(ctx context.Context, container string, options container.StopOptions) error FnCopyFromContainer func(ctx context.Context, container, srcPath string) (io.ReadCloser, container.PathStat, error) FnContainerExecCreate func(ctx context.Context, container string, config container.ExecOptions) (types.IDResponse, error) FnContainerExecInspect func(ctx context.Context, execID string) (container.ExecInspect, error) FnContainerExecStart func(ctx context.Context, execID string, config container.ExecStartOptions) error FnImageList func(ctx context.Context, options image.ListOptions) ([]image.Summary, error) FnImagePull func(ctx context.Context, refStr string, options image.PullOptions) (io.ReadCloser, error) FnServerVersion func(ctx context.Context) (types.Version, error) FnVolumeInspect func(ctx context.Context, volumeID string) (volume.Volume, error) FnInfo func(ctx context.Context) (system.Info, error) }
func NewMockClient ¶ added in v0.14.1
func NewMockClient() MockClient
func (MockClient) ContainerCreate ¶
func (m MockClient) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *ocispec.Platform, containerName string) (container.CreateResponse, error)
func (MockClient) ContainerExecCreate ¶
func (m MockClient) ContainerExecCreate(ctx context.Context, container string, config container.ExecOptions) (types.IDResponse, error)
func (MockClient) ContainerExecInspect ¶
func (m MockClient) ContainerExecInspect(ctx context.Context, execID string) (container.ExecInspect, error)
func (MockClient) ContainerExecStart ¶
func (m MockClient) ContainerExecStart(ctx context.Context, execID string, config container.ExecStartOptions) error
func (MockClient) ContainerInspect ¶
func (m MockClient) ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error)
func (MockClient) ContainerRemove ¶
func (m MockClient) ContainerRemove(ctx context.Context, container string, options container.RemoveOptions) error
func (MockClient) ContainerStart ¶
func (m MockClient) ContainerStart(ctx context.Context, container string, options container.StartOptions) error
func (MockClient) ContainerStop ¶
func (m MockClient) ContainerStop(ctx context.Context, container string, options container.StopOptions) error
func (MockClient) CopyFromContainer ¶
func (m MockClient) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, container.PathStat, error)
func (MockClient) ImageList ¶
func (m MockClient) ImageList(ctx context.Context, options image.ListOptions) ([]image.Summary, error)
func (MockClient) ImagePull ¶
func (m MockClient) ImagePull(ctx context.Context, refStr string, options image.PullOptions) (io.ReadCloser, error)
func (MockClient) ServerVersion ¶
func (MockClient) VolumeInspect ¶
Click to show internal directories.
Click to hide internal directories.