github.com/anchore/syft@v1.4.2-0.20240516191711-1bec1fc5d397/syft/source/image_metadata.go (about) 1 package source 2 3 // ImageMetadata represents all static metadata that defines what a container image is. This is useful to later describe 4 // "what" was cataloged without needing the more complicated stereoscope Image objects or FileResolver objects. 5 type ImageMetadata struct { 6 UserInput string `json:"userInput"` 7 ID string `json:"imageID"` 8 ManifestDigest string `json:"manifestDigest"` 9 MediaType string `json:"mediaType"` 10 Tags []string `json:"tags"` 11 Size int64 `json:"imageSize"` 12 Layers []LayerMetadata `json:"layers"` 13 RawManifest []byte `json:"manifest"` 14 RawConfig []byte `json:"config"` 15 RepoDigests []string `json:"repoDigests"` 16 Architecture string `json:"architecture"` 17 Variant string `json:"architectureVariant,omitempty"` 18 OS string `json:"os"` 19 Labels map[string]string `json:"labels,omitempty"` 20 } 21 22 // LayerMetadata represents all static metadata that defines what a container image layer is. 23 type LayerMetadata struct { 24 MediaType string `json:"mediaType"` 25 Digest string `json:"digest"` 26 Size int64 `json:"size"` 27 }