metadata

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// AnnotationSource is the OpenContainers annotation for specifying
	// the upstream source of an OCI artifact.
	AnnotationSource = "org.opencontainers.image.source"

	// AnnotationRevision is the OpenContainers annotation for specifying
	// the upstream source revision of an OCI artifact.
	AnnotationRevision = "org.opencontainers.image.revision"

	// AnnotationCreated is the OpenContainers annotation for specifying
	// the date and time on which the OCI artifact was built (RFC 3339).
	AnnotationCreated = "org.opencontainers.image.created"

	// AnnotationVersion is the OpenContainers annotation for specifying
	// the semantic version of an artifact.
	AnnotationVersion = "org.opencontainers.image.version"

	// AnnotationTitle is the OpenContainers annotation for specifying
	// the human-readable title of an artifact.
	AnnotationTitle = "org.opencontainers.image.title"
)

Variables

This section is empty.

Functions

func ParseAnnotations

func ParseAnnotations(annotationsStr []string) (map[string]string, error)

ParseAnnotations parses the annotations string in key=value format and returns the OpenContainers annotations.

Types

type Metadata

type Metadata struct {
	Created     string
	Source      string
	Revision    string
	Digest      string
	URL         string
	Platform    *v1.Platform
	Annotations map[string]string
}

Metadata holds the upstream information about on artifact's source.

func MetadataFromAnnotations

func MetadataFromAnnotations(annotations map[string]string) *Metadata

MetadataFromAnnotations parses the OpenContainers annotations and returns a Metadata object.

func (*Metadata) ToAnnotations

func (m *Metadata) ToAnnotations() map[string]string

ToAnnotations returns the OpenContainers annotations map.

Jump to

Keyboard shortcuts

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