summaryrefslogtreecommitdiff
path: root/pkg/domain/entities
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-26 18:11:38 +0100
committerGitHub <noreply@github.com>2020-03-26 18:11:38 +0100
commit4f38509b6c8366e1093968833e2342b5b65311c5 (patch)
tree299b90de83112d133e56c85ee4c9d002aa29f056 /pkg/domain/entities
parent8cccac54979b804d1086ff42654de07dba802a2e (diff)
parentf38a26bfa0621e06ad8401ded3e10d7ea834819e (diff)
downloadpodman-4f38509b6c8366e1093968833e2342b5b65311c5.tar.gz
podman-4f38509b6c8366e1093968833e2342b5b65311c5.tar.bz2
podman-4f38509b6c8366e1093968833e2342b5b65311c5.zip
Merge pull request #5615 from jwhonce/wip/images
V2 podman image rm | podman rmi [IMAGE]
Diffstat (limited to 'pkg/domain/entities')
-rw-r--r--pkg/domain/entities/engine_image.go3
-rw-r--r--pkg/domain/entities/images.go12
2 files changed, 10 insertions, 5 deletions
diff --git a/pkg/domain/entities/engine_image.go b/pkg/domain/entities/engine_image.go
index d44fdaf53..d0c860a04 100644
--- a/pkg/domain/entities/engine_image.go
+++ b/pkg/domain/entities/engine_image.go
@@ -5,7 +5,8 @@ import (
)
type ImageEngine interface {
- Delete(ctx context.Context, nameOrId string, opts ImageDeleteOptions) (*ImageDeleteReport, error)
+ Delete(ctx context.Context, nameOrId []string, opts ImageDeleteOptions) (*ImageDeleteReport, error)
+ Exists(ctx context.Context, nameOrId string) (*BoolReport, error)
History(ctx context.Context, nameOrId string, opts ImageHistoryOptions) (*ImageHistoryReport, error)
List(ctx context.Context, opts ImageListOptions) ([]*ImageSummary, error)
Prune(ctx context.Context, opts ImagePruneOptions) (*ImagePruneReport, error)
diff --git a/pkg/domain/entities/images.go b/pkg/domain/entities/images.go
index f04317e37..4a51b3de4 100644
--- a/pkg/domain/entities/images.go
+++ b/pkg/domain/entities/images.go
@@ -81,14 +81,18 @@ func (i *ImageSummary) IsDangling() bool {
}
type ImageDeleteOptions struct {
+ All bool
Force bool
}
-// ImageDeleteResponse is the response for removing an image from storage and containers
-// what was untagged vs actually removed
+// ImageDeleteResponse is the response for removing one or more image(s) from storage
+// and containers what was untagged vs actually removed
type ImageDeleteReport struct {
- Untagged []string `json:"untagged"`
- Deleted string `json:"deleted"`
+ Untagged []string `json:",omitempty"`
+ Deleted []string `json:",omitempty"`
+ Errors []error
+ ImageNotFound error
+ ImageInUse error
}
type ImageHistoryOptions struct{}