-
-
Notifications
You must be signed in to change notification settings - Fork 605
Expand file tree
/
Copy pathimage.go
More file actions
27 lines (21 loc) · 619 Bytes
/
image.go
File metadata and controls
27 lines (21 loc) · 619 Bytes
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
26
27
package testcontainers
import (
"context"
"github.com/moby/moby/client"
)
// ImageInfo represents summary information of an image
type ImageInfo struct {
ID string
Name string
}
type saveImageOptions struct {
dockerSaveOpts []client.ImageSaveOption
}
type SaveImageOption func(*saveImageOptions) error
// ImageProvider allows manipulating images
type ImageProvider interface {
ListImages(context.Context) ([]ImageInfo, error)
SaveImages(context.Context, string, ...string) error
SaveImagesWithOpts(context.Context, string, []string, ...SaveImageOption) error
PullImage(context.Context, string) error
}