summaryrefslogtreecommitdiff
path: root/pkg/domain/entities/images.go
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-03-23 09:04:31 -0700
committerJhon Honce <jhonce@redhat.com>2020-03-24 16:06:01 -0700
commit1d7cb7cc48d06631e2bdfd0e25eeccc8e87b042f (patch)
treea9ce6c3b2e91a797cf8174d7a4e9d62eccb4d1e8 /pkg/domain/entities/images.go
parent0c084d9719772a9b68d5eb67114cf5bf001958b2 (diff)
downloadpodman-1d7cb7cc48d06631e2bdfd0e25eeccc8e87b042f.tar.gz
podman-1d7cb7cc48d06631e2bdfd0e25eeccc8e87b042f.tar.bz2
podman-1d7cb7cc48d06631e2bdfd0e25eeccc8e87b042f.zip
V2 podman images/image list
* Updated entities to support flags/options * Updated bindings caused by entities changes * Removed handlers.ImageSummary in favor of entities.ImageSummary * Introduced StringSet() container object to simply error checking Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/domain/entities/images.go')
-rw-r--r--pkg/domain/entities/images.go61
1 files changed, 22 insertions, 39 deletions
diff --git a/pkg/domain/entities/images.go b/pkg/domain/entities/images.go
index f18ee2651..f04317e37 100644
--- a/pkg/domain/entities/images.go
+++ b/pkg/domain/entities/images.go
@@ -48,22 +48,24 @@ func (i *Image) Id() string {
}
type ImageSummary struct {
- Identifier
- ID string `json:"Id"`
- ParentId string `json:",omitempty"`
- RepoTags []string `json:",omitempty"`
- Created int `json:",omitempty"`
- Size int `json:",omitempty"`
- SharedSize int `json:",omitempty"`
- VirtualSize int `json:",omitempty"`
- Labels string `json:",omitempty"`
- Containers int `json:",omitempty"`
- ReadOnly bool `json:",omitempty"`
- Dangling bool `json:",omitempty"`
+ ID string `json:"Id"`
+ ParentId string `json:",omitempty"`
+ RepoTags []string `json:",omitempty"`
+ Created int64 `json:",omitempty"`
+ Size int64 `json:",omitempty"`
+ SharedSize int `json:",omitempty"`
+ VirtualSize int64 `json:",omitempty"`
+ Labels map[string]string `json:",omitempty"`
+ Containers int `json:",omitempty"`
+ ReadOnly bool `json:",omitempty"`
+ Dangling bool `json:",omitempty"`
// Podman extensions
- Digest digest.Digest `json:",omitempty"`
- ConfigDigest digest.Digest `json:",omitempty"`
+ Names []string `json:",omitempty"`
+ Digest string `json:",omitempty"`
+ Digests []string `json:",omitempty"`
+ ConfigDigest string `json:",omitempty"`
+ History []string `json:",omitempty"`
}
func (i *ImageSummary) Id() string {
@@ -78,18 +80,6 @@ func (i *ImageSummary) IsDangling() bool {
return i.Dangling
}
-type ImageOptions struct {
- All bool
- Digests bool
- Filter []string
- Format string
- Noheading bool
- NoTrunc bool
- Quiet bool
- Sort string
- History bool
-}
-
type ImageDeleteOptions struct {
Force bool
}
@@ -124,21 +114,14 @@ type ImageInspectOptions struct {
}
type ImageListOptions struct {
- All bool `json:"all" schema:"all"`
- Digests bool `json:"digests" schema:"digests"`
- Filter []string `json:",omitempty"`
- Filters url.Values `json:"filters" schema:"filters"`
- Format string `json:",omitempty"`
- History bool `json:",omitempty"`
- Noheading bool `json:",omitempty"`
- NoTrunc bool `json:",omitempty"`
- Quiet bool `json:",omitempty"`
- Sort string `json:",omitempty"`
+ All bool `json:"all" schema:"all"`
+ Filter []string `json:",omitempty"`
+ Filters url.Values `json:"filters" schema:"filters"`
}
-type ImageListReport struct {
- Images []ImageSummary
-}
+// type ImageListReport struct {
+// Images []ImageSummary
+// }
type ImagePruneOptions struct {
All bool