-
Notifications
You must be signed in to change notification settings - Fork 35
/
interfaces.go
25 lines (22 loc) · 1.13 KB
/
interfaces.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package main
import (
"context"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/api/types/volume"
)
// dockerClient is an interface that represents the reapers required Docker methods.
type dockerClient interface {
ContainerList(ctx context.Context, options container.ListOptions) ([]types.Container, error)
ContainerRemove(ctx context.Context, containerID string, options container.RemoveOptions) error
ImageList(ctx context.Context, options image.ListOptions) ([]image.Summary, error)
ImageRemove(ctx context.Context, imageID string, options image.RemoveOptions) ([]image.DeleteResponse, error)
NetworkList(ctx context.Context, options network.ListOptions) ([]network.Summary, error)
NetworkRemove(ctx context.Context, networkID string) error
VolumeList(ctx context.Context, options volume.ListOptions) (volume.ListResponse, error)
VolumeRemove(ctx context.Context, volumeID string, force bool) error
Ping(ctx context.Context) (types.Ping, error)
NegotiateAPIVersion(ctx context.Context)
}