manifest

package
v1.2.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapByTag

func MapByTag(manifests map[string]Manifest) map[string]Manifest

MapByTag maps passed manifests by their tag names By default manifests are mapped by their digests.

func MergeMaps

func MergeMaps(mapA, mapB map[string]Manifest) map[string]Manifest

MergeMaps merges two passed manifest maps into a single one

func ParseMap

func ParseMap(rs map[string]Raw) (map[string]Manifest, error)

ParseMap does Parse() over a map of passed raw manifests

Types

type Manifest

type Manifest struct {
	ID             string
	ImageSizeBytes int64
	MediaType      string
	Tags           []string
	TimeCreated    int64
	TimeUploaded   int64
}

Manifest is an additional tag information presented by some registries (e.g. GCR)

func Parse

func Parse(id string, r Raw) (*Manifest, error)

Parse parses raw manifest and returns a normal one

func (Manifest) Created

func (m Manifest) Created() int64

Created gets image/tag creation date

type Raw

type Raw struct {
	ImageSizeBytes string
	MediaType      string
	Tags           []string `json:"tag"`
	TimeCreatedMs  string
	TimeUploadedMs string
}

Raw embodies raw, unprocessed manifest structure

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL