Documentation
¶
Index ¶
- type FakeConn
- func (c FakeConn) Close() error
- func (c FakeConn) LocalAddr() net.Addr
- func (c FakeConn) Read(b []byte) (n int, err error)
- func (c FakeConn) RemoteAddr() net.Addr
- func (c FakeConn) SetDeadline(t time.Time) error
- func (c FakeConn) SetReadDeadline(t time.Time) error
- func (c FakeConn) SetWriteDeadline(t time.Time) error
- func (c FakeConn) Write(b []byte) (n int, err error)
- type FakeDockerClient
- func (d *FakeDockerClient) ContainerAttach(ctx context.Context, container string, ...) (mobyClient.ContainerAttachResult, error)
- func (d *FakeDockerClient) ContainerCommit(ctx context.Context, container string, ...) (mobyClient.ContainerCommitResult, error)
- func (d *FakeDockerClient) ContainerCreate(ctx context.Context, options mobyClient.ContainerCreateOptions) (mobyClient.ContainerCreateResult, error)
- func (d *FakeDockerClient) ContainerInspect(ctx context.Context, container string, ...) (mobyClient.ContainerInspectResult, error)
- func (d *FakeDockerClient) ContainerKill(ctx context.Context, container string, options mobyClient.ContainerKillOptions) (mobyClient.ContainerKillResult, error)
- func (d *FakeDockerClient) ContainerRemove(ctx context.Context, containerID string, ...) (mobyClient.ContainerRemoveResult, error)
- func (d *FakeDockerClient) ContainerStart(ctx context.Context, container string, ...) (mobyClient.ContainerStartResult, error)
- func (d *FakeDockerClient) ContainerWait(ctx context.Context, containerID string, ...) mobyClient.ContainerWaitResult
- func (d *FakeDockerClient) CopyFromContainer(ctx context.Context, container string, ...) (mobyClient.CopyFromContainerResult, error)
- func (d *FakeDockerClient) CopyToContainer(ctx context.Context, container string, ...) (mobyClient.CopyToContainerResult, error)
- func (d *FakeDockerClient) ImageBuild(ctx context.Context, context io.Reader, options mobyClient.ImageBuildOptions) (mobyClient.ImageBuildResult, error)
- func (d *FakeDockerClient) ImageInspect(ctx context.Context, imageID string, _ ...mobyClient.ImageInspectOption) (mobyClient.ImageInspectResult, error)
- func (d *FakeDockerClient) ImagePull(ctx context.Context, ref string, options mobyClient.ImagePullOptions) (mobyClient.ImagePullResponse, error)
- func (d *FakeDockerClient) ImageRemove(ctx context.Context, imageID string, options mobyClient.ImageRemoveOptions) (mobyClient.ImageRemoveResult, error)
- func (d *FakeDockerClient) ServerVersion(ctx context.Context, options mobyClient.ServerVersionOptions) (mobyClient.ServerVersionResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeConn ¶ added in v1.1.3
type FakeConn struct {
}
FakeConn fakes a net.Conn
func (FakeConn) RemoteAddr ¶ added in v1.1.3
RemoteAddr returns the remote address
func (FakeConn) SetDeadline ¶ added in v1.1.3
SetDeadline sets the deadline
func (FakeConn) SetReadDeadline ¶ added in v1.1.3
SetReadDeadline sets the read deadline
func (FakeConn) SetWriteDeadline ¶ added in v1.1.3
SetWriteDeadline sets the write deadline
type FakeDockerClient ¶
type FakeDockerClient struct {
CopyToContainerID string
CopyToContainerPath string
CopyToContainerContent io.Reader
CopyFromContainerID string
CopyFromContainerPath string
CopyFromContainerErr error
WaitContainerID string
WaitContainerResult int
WaitContainerErr error
WaitContainerErrInspectJSON mobyClient.ContainerInspectResult
ContainerCommitID string
ContainerCommitOptions mobyClient.ContainerCommitOptions
ContainerCommitResponse mobyClient.ContainerCommitResult
ContainerCommitErr error
BuildImageOpts mobyClient.ImageBuildOptions
BuildImageErr error
Images map[string]mobyClient.ImageInspectResult
Containers map[string]mobyContainer.Config
PullFail error
Calls []string
}
FakeDockerClient provides a Fake client for Docker testing
func NewFakeDockerClient ¶ added in v1.1.3
func NewFakeDockerClient() *FakeDockerClient
NewFakeDockerClient returns a new FakeDockerClient
func (*FakeDockerClient) ContainerAttach ¶ added in v1.1.2
func (d *FakeDockerClient) ContainerAttach(ctx context.Context, container string, options mobyClient.ContainerAttachOptions) (mobyClient.ContainerAttachResult, error)
ContainerAttach attaches a connection to a container in the server.
func (*FakeDockerClient) ContainerCommit ¶ added in v1.1.2
func (d *FakeDockerClient) ContainerCommit(ctx context.Context, container string, options mobyClient.ContainerCommitOptions) (mobyClient.ContainerCommitResult, error)
ContainerCommit applies changes into a container and creates a new tagged image.
func (*FakeDockerClient) ContainerCreate ¶ added in v1.1.3
func (d *FakeDockerClient) ContainerCreate(ctx context.Context, options mobyClient.ContainerCreateOptions) (mobyClient.ContainerCreateResult, error)
ContainerCreate creates a new container based in the given configuration.
func (*FakeDockerClient) ContainerInspect ¶ added in v1.1.3
func (d *FakeDockerClient) ContainerInspect(ctx context.Context, container string, options mobyClient.ContainerInspectOptions) (mobyClient.ContainerInspectResult, error)
ContainerInspect returns the container information.
func (*FakeDockerClient) ContainerKill ¶ added in v1.1.5
func (d *FakeDockerClient) ContainerKill(ctx context.Context, container string, options mobyClient.ContainerKillOptions) (mobyClient.ContainerKillResult, error)
ContainerKill terminates the container process but does not remove the container from the docker host.
func (*FakeDockerClient) ContainerRemove ¶ added in v1.1.3
func (d *FakeDockerClient) ContainerRemove(ctx context.Context, containerID string, options mobyClient.ContainerRemoveOptions) (mobyClient.ContainerRemoveResult, error)
ContainerRemove kills and removes a container from the docker host.
func (*FakeDockerClient) ContainerStart ¶ added in v1.1.3
func (d *FakeDockerClient) ContainerStart(ctx context.Context, container string, options mobyClient.ContainerStartOptions) (mobyClient.ContainerStartResult, error)
ContainerStart sends a request to the docker daemon to start a container.
func (*FakeDockerClient) ContainerWait ¶ added in v1.1.2
func (d *FakeDockerClient) ContainerWait(ctx context.Context, containerID string, options mobyClient.ContainerWaitOptions) mobyClient.ContainerWaitResult
ContainerWait pauses execution until a container exits.
func (*FakeDockerClient) CopyFromContainer ¶
func (d *FakeDockerClient) CopyFromContainer(ctx context.Context, container string, options mobyClient.CopyFromContainerOptions) (mobyClient.CopyFromContainerResult, error)
CopyFromContainer gets the content from the container and returns it as a Reader to manipulate it in the host. It's up to the caller to close the reader.
func (*FakeDockerClient) CopyToContainer ¶ added in v1.1.2
func (d *FakeDockerClient) CopyToContainer(ctx context.Context, container string, options mobyClient.CopyToContainerOptions) (mobyClient.CopyToContainerResult, error)
CopyToContainer copies content into the container filesystem.
func (*FakeDockerClient) ImageBuild ¶ added in v1.1.2
func (d *FakeDockerClient) ImageBuild(ctx context.Context, context io.Reader, options mobyClient.ImageBuildOptions) (mobyClient.ImageBuildResult, error)
ImageBuild sends request to the daemon to build images.
func (*FakeDockerClient) ImageInspect ¶ added in v1.6.1
func (d *FakeDockerClient) ImageInspect(ctx context.Context, imageID string, _ ...mobyClient.ImageInspectOption) (mobyClient.ImageInspectResult, error)
ImageInspectWithRaw returns the image information and its raw representation.
func (*FakeDockerClient) ImagePull ¶ added in v1.1.3
func (d *FakeDockerClient) ImagePull(ctx context.Context, ref string, options mobyClient.ImagePullOptions) (mobyClient.ImagePullResponse, error)
ImagePull requests the docker host to pull an image from a remote registry.
func (*FakeDockerClient) ImageRemove ¶ added in v1.1.3
func (d *FakeDockerClient) ImageRemove(ctx context.Context, imageID string, options mobyClient.ImageRemoveOptions) (mobyClient.ImageRemoveResult, error)
ImageRemove removes an image from the docker host.
func (*FakeDockerClient) ServerVersion ¶ added in v1.1.3
func (d *FakeDockerClient) ServerVersion(ctx context.Context, options mobyClient.ServerVersionOptions) (mobyClient.ServerVersionResult, error)
ServerVersion returns information of the docker client and server host.