aboutsummaryrefslogtreecommitdiff
path: root/pkg/inspect/inspect.go
blob: ec3d98613ee1e0c522e5d96bfa085df7e42d5194 (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package inspect

import (
	"time"

	"github.com/containers/libpod/libpod/driver"
	"github.com/opencontainers/go-digest"
	"github.com/opencontainers/image-spec/specs-go/v1"
)

// ImageData holds the inspect information of an image
type ImageData struct {
	ID           string            `json:"Id"`
	Digest       digest.Digest     `json:"Digest"`
	RepoTags     []string          `json:"RepoTags"`
	RepoDigests  []string          `json:"RepoDigests"`
	Parent       string            `json:"Parent"`
	Comment      string            `json:"Comment"`
	Created      *time.Time        `json:"Created"`
	Config       *v1.ImageConfig   `json:"Config"`
	Version      string            `json:"Version"`
	Author       string            `json:"Author"`
	Architecture string            `json:"Architecture"`
	Os           string            `json:"Os"`
	Size         int64             `json:"Size"`
	VirtualSize  int64             `json:"VirtualSize"`
	GraphDriver  *driver.Data      `json:"GraphDriver"`
	RootFS       *RootFS           `json:"RootFS"`
	Labels       map[string]string `json:"Labels"`
	Annotations  map[string]string `json:"Annotations"`
	ManifestType string            `json:"ManifestType"`
	User         string            `json:"User"`
	History      []v1.History      `json:"History"`
}

// RootFS holds the root fs information of an image
type RootFS struct {
	Type   string          `json:"Type"`
	Layers []digest.Digest `json:"Layers"`
}

// ImageResult is used for podman images for collection and output
type ImageResult struct {
	Tag          string
	Repository   string
	RepoDigests  []string
	RepoTags     []string
	ID           string
	Digest       digest.Digest
	ConfigDigest digest.Digest
	Created      time.Time
	Size         *uint64
	Labels       map[string]string
	Dangling     bool
}