DockerClientInterface is an abstract interface for testability. It abstracts the interface of docker client.
| 59 | |
| 60 | // DockerClientInterface is an abstract interface for testability. It abstracts the interface of docker client. |
| 61 | type DockerClientInterface interface { |
| 62 | ListContainers(options dockercontainer.ListOptions) ([]dockertypes.Container, error) |
| 63 | InspectContainer(id string) (*dockertypes.ContainerJSON, error) |
| 64 | InspectContainerWithSize(id string) (*dockertypes.ContainerJSON, error) |
| 65 | CreateContainer( |
| 66 | createConfig ContainerCreateConfig, |
| 67 | ) (*dockercontainer.CreateResponse, error) |
| 68 | StartContainer(id string) error |
| 69 | StopContainer(id string, timeout time.Duration) error |
| 70 | UpdateContainerResources(id string, updateConfig dockercontainer.UpdateConfig) error |
| 71 | RemoveContainer(id string, opts dockercontainer.RemoveOptions) error |
| 72 | InspectImageByRef(imageRef string) (*dockertypes.ImageInspect, error) |
| 73 | InspectImageByID(imageID string) (*dockertypes.ImageInspect, error) |
| 74 | ListImages(opts dockertypes.ImageListOptions) ([]dockerimagetypes.Summary, error) |
| 75 | PullImage(image string, auth dockerregistry.AuthConfig, opts dockertypes.ImagePullOptions) error |
| 76 | RemoveImage( |
| 77 | imageName string, |
| 78 | opts dockertypes.ImageRemoveOptions, |
| 79 | ) ([]dockerimagetypes.DeleteResponse, error) |
| 80 | ImageHistory(id string) ([]dockerimagetypes.HistoryResponseItem, error) |
| 81 | Logs(string, dockercontainer.LogsOptions, StreamOptions) error |
| 82 | Version() (*dockertypes.Version, error) |
| 83 | Info() (*dockersystem.Info, error) |
| 84 | CreateExec(string, dockertypes.ExecConfig) (*dockertypes.IDResponse, error) |
| 85 | StartExec(string, dockertypes.ExecStartCheck, StreamOptions) error |
| 86 | InspectExec(id string) (*dockertypes.ContainerExecInspect, error) |
| 87 | AttachToContainer(string, dockercontainer.AttachOptions, StreamOptions) error |
| 88 | ResizeContainerTTY(id string, height, width uint) error |
| 89 | ResizeExecTTY(id string, height, width uint) error |
| 90 | GetContainerStats(id string) (*dockertypes.StatsJSON, error) |
| 91 | } |
| 92 | |
| 93 | // Get a *dockerapi.Client, either using the endpoint passed in, or using |
| 94 | // DOCKER_HOST, DOCKER_TLS_VERIFY, and DOCKER_CERT path per their spec |
no outgoing calls
no test coverage detected
searching dependent graphs…