container

package
v1.25.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: MIT Imports: 7 Imported by: 5

Documentation

Index

Constants

View Source
const (
	ContentTypeDockerDistributionManifestV2 = "application/vnd.docker.distribution.manifest.v2+json"

	ManifestFilename = "manifest.json"
	UploadVersion    = "_upload"
)
View Source
const (
	PropertyRepository        = "container.repository"
	PropertyDigest            = "container.digest"
	PropertyMediaType         = "container.mediatype"
	PropertyManifestTagged    = "container.manifest.tagged"
	PropertyManifestReference = "container.manifest.reference"

	DefaultPlatform = "linux/amd64"
)

Variables

This section is empty.

Functions

func IsMediaTypeImageIndex

func IsMediaTypeImageIndex(mt string) bool

func IsMediaTypeImageManifest

func IsMediaTypeImageManifest(mt string) bool

func IsMediaTypeValid

func IsMediaTypeValid(mt string) bool

Types

type ImageType

type ImageType string
const (
	TypeOCI  ImageType = "oci"
	TypeHelm ImageType = "helm"
)

func (ImageType) Name

func (it ImageType) Name() string

Name gets the name of the image type

type Manifest added in v1.20.0

type Manifest struct {
	Platform string `json:"platform"`
	Digest   string `json:"digest"`
	Size     int64  `json:"size"`
}

type Metadata

type Metadata struct {
	Type             ImageType         `json:"type"`
	IsTagged         bool              `json:"is_tagged"`
	Platform         string            `json:"platform,omitempty"`
	Description      string            `json:"description,omitempty"`
	Authors          []string          `json:"authors,omitempty"`
	Licenses         string            `json:"license,omitempty"`
	ProjectURL       string            `json:"project_url,omitempty"`
	RepositoryURL    string            `json:"repository_url,omitempty"`
	DocumentationURL string            `json:"documentation_url,omitempty"`
	Labels           map[string]string `json:"labels,omitempty"`
	ImageLayers      []string          `json:"layer_creation,omitempty"`
	Manifests        []*Manifest       `json:"manifests,omitempty"`
}

Metadata represents the metadata of a Container package

func ParseImageConfig

func ParseImageConfig(mediaType string, r io.Reader) (*Metadata, error)

ParseImageConfig parses the metadata of an image config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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