mockclient

package
v0.0.0-...-c9014b7 Latest Latest
Warning

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

Go to latest
Published: May 15, 2017 License: Apache-2.0, CC-BY-SA-4.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 MockClient

type MockClient struct {
	mock.Mock
}

MockClient is a mock API Client based on docker/api

func NewMockClient

func NewMockClient() *MockClient

NewMockClient creates a new mock client

func (*MockClient) CheckpointCreate

func (client *MockClient) CheckpointCreate(ctx context.Context, container string, options types.CheckpointCreateOptions) error

CheckpointCreate creates a checkpoint from the given container with the given name

func (*MockClient) CheckpointDelete

func (client *MockClient) CheckpointDelete(ctx context.Context, container string, checkpointID string) error

CheckpointDelete deletes the checkpoint with the given name from the given container

func (*MockClient) CheckpointList

func (client *MockClient) CheckpointList(ctx context.Context, container string) ([]types.Checkpoint, error)

CheckpointList returns the volumes configured in the docker host

func (*MockClient) ClientVersion

func (client *MockClient) ClientVersion() string

ClientVersion returns the version string associated with this instance of the Client

func (*MockClient) ContainerAttach

func (client *MockClient) ContainerAttach(ctx context.Context, container string, options types.ContainerAttachOptions) (types.HijackedResponse, error)

ContainerAttach attaches a connection to a container in the server

func (*MockClient) ContainerCommit

func (client *MockClient) ContainerCommit(ctx context.Context, container string, options types.ContainerCommitOptions) (types.IDResponse, error)

ContainerCommit applies changes into a container and creates a new tagged image

func (*MockClient) ContainerCreate

func (client *MockClient) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, containerName string) (container.ContainerCreateCreatedBody, error)

ContainerCreate creates a new container based in the given configuration

func (*MockClient) ContainerDiff

func (client *MockClient) ContainerDiff(ctx context.Context, container string) ([]types.ContainerChange, error)

ContainerDiff shows differences in a container filesystem since it was started

func (*MockClient) ContainerExecAttach

func (client *MockClient) ContainerExecAttach(ctx context.Context, execID string, config types.ExecConfig) (types.HijackedResponse, error)

ContainerExecAttach attaches a connection to an exec process in the server

func (*MockClient) ContainerExecCreate

func (client *MockClient) ContainerExecCreate(ctx context.Context, container string, config types.ExecConfig) (types.IDResponse, error)

ContainerExecCreate creates a new exec configuration to run an exec process

func (*MockClient) ContainerExecInspect

func (client *MockClient) ContainerExecInspect(ctx context.Context, execID string) (types.ContainerExecInspect, error)

ContainerExecInspect returns information about a specific exec process on the docker host

func (*MockClient) ContainerExecResize

func (client *MockClient) ContainerExecResize(ctx context.Context, execID string, options types.ResizeOptions) error

ContainerExecResize changes the size of the tty for an exec process running inside a container

func (*MockClient) ContainerExecStart

func (client *MockClient) ContainerExecStart(ctx context.Context, execID string, config types.ExecStartCheck) error

ContainerExecStart starts an exec process already create in the docker host

func (*MockClient) ContainerExport

func (client *MockClient) ContainerExport(ctx context.Context, container string) (io.ReadCloser, error)

ContainerExport retrieves the raw contents of a container and returns them as an io.ReadCloser

func (*MockClient) ContainerInspect

func (client *MockClient) ContainerInspect(ctx context.Context, container string) (types.ContainerJSON, error)

ContainerInspect returns the container information

func (*MockClient) ContainerInspectWithRaw

func (client *MockClient) ContainerInspectWithRaw(ctx context.Context, container string, getSize bool) (types.ContainerJSON, []byte, error)

ContainerInspectWithRaw returns the container information and its raw representation

func (*MockClient) ContainerKill

func (client *MockClient) ContainerKill(ctx context.Context, container, signal string) error

ContainerKill terminates the container process but does not remove the container from the docker host

func (*MockClient) ContainerList

func (client *MockClient) ContainerList(ctx context.Context, options types.ContainerListOptions) ([]types.Container, error)

ContainerList returns the list of containers in the docker host

func (*MockClient) ContainerLogs

func (client *MockClient) ContainerLogs(ctx context.Context, container string, options types.ContainerLogsOptions) (io.ReadCloser, error)

ContainerLogs returns the logs generated by a container in an io.ReadCloser

func (*MockClient) ContainerPause

func (client *MockClient) ContainerPause(ctx context.Context, container string) error

ContainerPause pauses the main process of a given container without terminating it

func (*MockClient) ContainerRemove

func (client *MockClient) ContainerRemove(ctx context.Context, container string, options types.ContainerRemoveOptions) error

ContainerRemove kills and removes a container from the docker host

func (*MockClient) ContainerRename

func (client *MockClient) ContainerRename(ctx context.Context, container, newContainerName string) error

ContainerRename changes the name of a given container

func (*MockClient) ContainerResize

func (client *MockClient) ContainerResize(ctx context.Context, container string, options types.ResizeOptions) error

ContainerResize changes the size of the tty for a container

func (*MockClient) ContainerRestart

func (client *MockClient) ContainerRestart(ctx context.Context, container string, timeout *time.Duration) error

ContainerRestart stops and starts a container again

func (*MockClient) ContainerStart

func (client *MockClient) ContainerStart(ctx context.Context, container string, options types.ContainerStartOptions) error

ContainerStart sends a request to the docker daemon to start a container

func (*MockClient) ContainerStatPath

func (client *MockClient) ContainerStatPath(ctx context.Context, container, path string) (types.ContainerPathStat, error)

ContainerStatPath returns Stat information about a path inside the container filesystem

func (*MockClient) ContainerStats

func (client *MockClient) ContainerStats(ctx context.Context, container string, stream bool) (types.ContainerStats, error)

ContainerStats returns near realtime stats for a given container

func (*MockClient) ContainerStop

func (client *MockClient) ContainerStop(ctx context.Context, container string, timeout *time.Duration) error

ContainerStop stops a container without terminating the process

func (*MockClient) ContainerTop

func (client *MockClient) ContainerTop(ctx context.Context, container string, arguments []string) (types.ContainerProcessList, error)

ContainerTop shows process information from within a container

func (*MockClient) ContainerUnpause

func (client *MockClient) ContainerUnpause(ctx context.Context, container string) error

ContainerUnpause resumes the process execution within a container

func (*MockClient) ContainerUpdate

func (client *MockClient) ContainerUpdate(ctx context.Context, containerID string, updateConfig container.UpdateConfig) (container.ContainerUpdateOKBody, error)

ContainerUpdate updates resources of a container

func (*MockClient) ContainerWait

func (client *MockClient) ContainerWait(ctx context.Context, container string) (int64, error)

ContainerWait pauses execution until a container exits

func (*MockClient) ContainersPrune

ContainersPrune requests the daemon to delete unused data

func (*MockClient) CopyFromContainer

func (client *MockClient) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, types.ContainerPathStat, error)

CopyFromContainer gets the content from the container and returns it as a Reader to manipulate it in the host

func (*MockClient) CopyToContainer

func (client *MockClient) CopyToContainer(ctx context.Context, container, path string, content io.Reader, options types.CopyToContainerOptions) error

CopyToContainer copies content into the container filesystem

func (*MockClient) DiskUsage

func (client *MockClient) DiskUsage(ctx context.Context) (types.DiskUsage, error)

DiskUsage requests the current data usage from the daemon

func (*MockClient) Events

func (client *MockClient) Events(ctx context.Context, options types.EventsOptions) (<-chan events.Message, <-chan error)

Events returns a stream of events in the daemon in a events.Message

func (*MockClient) ImageBuild

func (client *MockClient) ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)

ImageBuild sends request to the daemon to build images

func (*MockClient) ImageCreate

func (client *MockClient) ImageCreate(ctx context.Context, parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error)

ImageCreate creates a new image based in the parent options

func (*MockClient) ImageHistory

func (client *MockClient) ImageHistory(ctx context.Context, image string) ([]types.ImageHistory, error)

ImageHistory returns the changes in an image in history format

func (*MockClient) ImageImport

func (client *MockClient) ImageImport(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) (io.ReadCloser, error)

ImageImport creates a new image based in the source options

func (*MockClient) ImageInspectWithRaw

func (client *MockClient) ImageInspectWithRaw(ctx context.Context, image string) (types.ImageInspect, []byte, error)

ImageInspectWithRaw returns the image information and it's raw representation

func (*MockClient) ImageList

func (client *MockClient) ImageList(ctx context.Context, options types.ImageListOptions) ([]types.ImageSummary, error)

ImageList returns a list of images in the docker host

func (*MockClient) ImageLoad

func (client *MockClient) ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error)

ImageLoad loads an image in the docker host from the client host

func (*MockClient) ImagePull

func (client *MockClient) ImagePull(ctx context.Context, ref string, options types.ImagePullOptions) (io.ReadCloser, error)

ImagePull requests the docker host to pull an image from a remote registry

func (*MockClient) ImagePush

func (client *MockClient) ImagePush(ctx context.Context, ref string, options types.ImagePushOptions) (io.ReadCloser, error)

ImagePush requests the docker host to push an image to a remote registry

func (*MockClient) ImageRemove

func (client *MockClient) ImageRemove(ctx context.Context, image string, options types.ImageRemoveOptions) ([]types.ImageDelete, error)

ImageRemove removes an image from the docker host

func (*MockClient) ImageSave

func (client *MockClient) ImageSave(ctx context.Context, images []string) (io.ReadCloser, error)

ImageSave retrieves one or more images from the docker host as an io.ReadCloser

func (*MockClient) ImageSearch

func (client *MockClient) ImageSearch(ctx context.Context, term string, options types.ImageSearchOptions) ([]registry.SearchResult, error)

ImageSearch makes the docker host to search by a term in a remote registry

func (*MockClient) ImageTag

func (client *MockClient) ImageTag(ctx context.Context, image, ref string) error

ImageTag tags an image in the docker host

func (*MockClient) ImagesPrune

func (client *MockClient) ImagesPrune(ctx context.Context, cfg types.ImagesPruneConfig) (types.ImagesPruneReport, error)

ImagesPrune requests the daemon to delete unused data

func (*MockClient) Info

func (client *MockClient) Info(ctx context.Context) (types.Info, error)

Info returns information about the docker server

func (*MockClient) NetworkConnect

func (client *MockClient) NetworkConnect(ctx context.Context, networkID, container string, config *network.EndpointSettings) error

NetworkConnect connects a container to an existent network in the docker host

func (*MockClient) NetworkCreate

func (client *MockClient) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error)

NetworkCreate creates a new network in the docker host

func (*MockClient) NetworkDisconnect

func (client *MockClient) NetworkDisconnect(ctx context.Context, networkID, container string, force bool) error

NetworkDisconnect disconnects a container from an existent network in the docker host

func (*MockClient) NetworkInspect

func (client *MockClient) NetworkInspect(ctx context.Context, networkID string) (types.NetworkResource, error)

NetworkInspect returns the information for a specific network configured in the docker host

func (*MockClient) NetworkInspectWithRaw

func (client *MockClient) NetworkInspectWithRaw(ctx context.Context, networkID string) (types.NetworkResource, []byte, error)

NetworkInspectWithRaw returns the information for a specific network configured in the docker host and it's raw representation

func (*MockClient) NetworkList

func (client *MockClient) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error)

NetworkList returns the list of networks configured in the docker host

func (*MockClient) NetworkRemove

func (client *MockClient) NetworkRemove(ctx context.Context, networkID string) error

NetworkRemove removes an existent network from the docker host

func (*MockClient) NetworksPrune

NetworksPrune requests the daemon to delete unused networks

func (*MockClient) Ping

func (client *MockClient) Ping(ctx context.Context) (types.Ping, error)

Ping pings the server and return the value of the "Docker-Experimental" header

func (*MockClient) RegistryLogin

func (client *MockClient) RegistryLogin(ctx context.Context, auth types.AuthConfig) (registry.AuthenticateOKBody, error)

RegistryLogin authenticates the docker server with a given docker registry

func (*MockClient) ServerVersion

func (client *MockClient) ServerVersion(ctx context.Context) (types.Version, error)

ServerVersion returns information of the docker client and server host

func (*MockClient) UpdateClientVersion

func (client *MockClient) UpdateClientVersion(v string)

UpdateClientVersion updates the client version

func (*MockClient) VolumeCreate

func (client *MockClient) VolumeCreate(ctx context.Context, options volume.VolumesCreateBody) (types.Volume, error)

VolumeCreate creates a volume in the docker host

func (*MockClient) VolumeInspect

func (client *MockClient) VolumeInspect(ctx context.Context, volumeID string) (types.Volume, error)

VolumeInspect returns the information about a specific volume in the docker host

func (*MockClient) VolumeInspectWithRaw

func (client *MockClient) VolumeInspectWithRaw(ctx context.Context, volumeID string) (types.Volume, []byte, error)

VolumeInspectWithRaw returns the information about a specific volume in the docker host and its raw representation

func (*MockClient) VolumeList

func (client *MockClient) VolumeList(ctx context.Context, filter filters.Args) (volume.VolumesListOKBody, error)

VolumeList returns the volumes configured in the docker host

func (*MockClient) VolumeRemove

func (client *MockClient) VolumeRemove(ctx context.Context, volumeID string, force bool) error

VolumeRemove removes a volume from the docker host

func (*MockClient) VolumesPrune

func (client *MockClient) VolumesPrune(ctx context.Context, cfg types.VolumesPruneConfig) (types.VolumesPruneReport, error)

VolumesPrune requests the daemon to delete unused data

Jump to

Keyboard shortcuts

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