gitlab.com/jfprevost/gitlab-runner-notlscheck@v11.11.4+incompatible/helpers/docker/client.go (about)

     1  package docker_helpers
     2  
     3  import (
     4  	"context"
     5  	"io"
     6  
     7  	"github.com/docker/docker/api/types"
     8  	"github.com/docker/docker/api/types/container"
     9  	"github.com/docker/docker/api/types/network"
    10  )
    11  
    12  type Client interface {
    13  	ImageInspectWithRaw(ctx context.Context, imageID string) (types.ImageInspect, []byte, error)
    14  
    15  	ImagePullBlocking(ctx context.Context, ref string, options types.ImagePullOptions) error
    16  	ImageImportBlocking(ctx context.Context, source types.ImageImportSource, ref string, options types.ImageImportOptions) error
    17  
    18  	ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, containerName string) (container.ContainerCreateCreatedBody, error)
    19  	ContainerStart(ctx context.Context, containerID string, options types.ContainerStartOptions) error
    20  	ContainerKill(ctx context.Context, containerID, signal string) error
    21  	ContainerInspect(ctx context.Context, containerID string) (types.ContainerJSON, error)
    22  	ContainerAttach(ctx context.Context, container string, options types.ContainerAttachOptions) (types.HijackedResponse, error)
    23  	ContainerRemove(ctx context.Context, containerID string, options types.ContainerRemoveOptions) error
    24  	ContainerLogs(ctx context.Context, container string, options types.ContainerLogsOptions) (io.ReadCloser, error)
    25  	ContainerExecCreate(ctx context.Context, container string, config types.ExecConfig) (types.IDResponse, error)
    26  	ContainerExecAttach(ctx context.Context, execID string, config types.ExecStartCheck) (types.HijackedResponse, error)
    27  
    28  	NetworkDisconnect(ctx context.Context, networkID, containerID string, force bool) error
    29  	NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error)
    30  
    31  	Info(ctx context.Context) (types.Info, error)
    32  
    33  	Close() error
    34  }