artifact

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 17 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package artifact defines the neutral release inventory and catalog bindings.

Index

Constants

View Source
const (
	APIVersion    = header.AuthoringGroupVersion
	InventoryKind = "ArtifactInventory"
	BindingsKind  = "ArtifactBindings"
)

Variables

This section is empty.

Functions

func Account

func Account(inventory *Inventory, bindings *Bindings) error

Account requires every producer artifact to have a matching disposition.

func Invalid

func Invalid(reason, message string) error

Invalid identifies artifact failures consistently across consumers.

func Pointer

func Pointer(pointer string) ([]string, error)

Pointer parses an object-only JSON Pointer, retaining escaped key semantics.

func ValidateBindings

func ValidateBindings(bindings *Bindings) error

ValidateBindings checks the merged disposition and target shape invariants.

func ValidateProvenance

func ValidateProvenance(p *Provenance) error

ValidateProvenance validates recorded metadata without requiring execution inputs.

Types

type Applied

type Applied struct {
	Artifact Identity `json:"artifact" yaml:"artifact"`
	Chart    *Chart   `json:"chart,omitempty" yaml:"chart,omitempty"`
	Image    *Image   `json:"image,omitempty" yaml:"image,omitempty"`
}

Applied associates a producer identity with its effective binding.

type Bindings

type Bindings struct {
	APIVersion       string             `json:"apiVersion" yaml:"apiVersion"`
	Kind             string             `json:"kind" yaml:"kind"`
	Charts           map[string]Chart   `json:"charts" yaml:"charts"`
	Images           map[string]Image   `json:"images" yaml:"images"`
	IgnoredArtifacts map[string]Ignored `json:"ignoredArtifacts" yaml:"ignoredArtifacts,omitempty"`
}

Bindings maps stable artifact names to catalog dispositions.

func EmptyBindings

func EmptyBindings() *Bindings

EmptyBindings is the canonical empty disposition document.

func Merge

func Merge(layers ...*Bindings) (*Bindings, error)

Merge replaces whole dispositions by artifact name, including across kinds. Inputs are never changed. Target slices are copied to isolate composed writes.

func ParseBindings

func ParseBindings(data []byte) (*Bindings, error)

ParseBindings validates shapes even for bindings that are inactive.

type Chart

type Chart struct {
	Component string `json:"component" yaml:"component"`
}

Chart binds a chart archive to one component.

type Identity

type Identity struct {
	Name           string    `json:"name" yaml:"name"`
	Type           string    `json:"type" yaml:"type"`
	Reference      string    `json:"reference" yaml:"reference"`
	Version        string    `json:"version" yaml:"version"`
	ManifestDigest string    `json:"manifestDigest" yaml:"manifestDigest"`
	ArchiveDigest  string    `json:"archiveDigest,omitempty" yaml:"archiveDigest,omitempty"`
	Platform       *Platform `json:"platform,omitempty" yaml:"platform,omitempty"`
}

Identity retains literal OCI identities; a chart's manifest is not its archive.

type Ignored

type Ignored struct {
	Reason string `json:"reason" yaml:"reason"`
}

Ignored accounts for an artifact without waiving selected-component coverage.

type IgnoredIdentity

type IgnoredIdentity struct {
	Artifact Identity `json:"artifact" yaml:"artifact"`
	Reason   string   `json:"reason" yaml:"reason"`
}

IgnoredIdentity preserves audit information for an intentionally unused artifact.

type Image

type Image struct {
	Targets []Target `json:"targets" yaml:"targets"`
}

Image binds a manifest to one or more explicit values targets.

type Inventory

type Inventory struct {
	APIVersion string     `json:"apiVersion" yaml:"apiVersion"`
	Kind       string     `json:"kind" yaml:"kind"`
	Metadata   *Metadata  `json:"metadata,omitempty" yaml:"metadata,omitempty"`
	Artifacts  []Identity `json:"artifacts" yaml:"artifacts"`
}

Inventory contains producer identities without catalog component names.

func ParseInventory

func ParseInventory(data []byte) (*Inventory, error)

ParseInventory strictly reads exactly one bounded YAML or JSON document.

type Metadata

type Metadata struct {
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
}

Metadata is an optional producer label.

type Options

type Options struct {
	Inventory        string   `json:"inventory,omitempty" yaml:"inventory,omitempty"`
	AllowCatalogPins []string `json:"allowCatalogPins,omitempty" yaml:"allowCatalogPins,omitempty"`
}

Options selects composition inputs; an inventory is the activation boundary.

type Platform

type Platform struct {
	OS           string  `json:"os" yaml:"os"`
	Architecture string  `json:"architecture" yaml:"architecture"`
	Variant      *string `json:"variant,omitempty" yaml:"variant,omitempty"`
}

Platform asserts a single manifest platform, independently of the host.

func (*Platform) Equal

func (p *Platform) Equal(other *Platform) bool

Equal compares platform assertions, including whether a variant was supplied.

type Provenance

type Provenance struct {
	InventoryDigest   string            `json:"inventoryDigest" yaml:"inventoryDigest"`
	BindingsDigest    string            `json:"bindingsDigest" yaml:"bindingsDigest"`
	BaseCatalogDigest string            `json:"baseCatalogDigest" yaml:"baseCatalogDigest"`
	AllowCatalogPins  []string          `json:"allowCatalogPins" yaml:"allowCatalogPins"`
	Verification      string            `json:"verification" yaml:"verification"`
	Applied           []Applied         `json:"applied" yaml:"applied"`
	Ignored           []IgnoredIdentity `json:"ignored" yaml:"ignored"`
}

Provenance records the immutable inputs and every applied or ignored identity.

func (*Provenance) Clone

func (p *Provenance) Clone() *Provenance

Clone returns an independent provenance record, including nested targets.

type Target

type Target struct {
	Component  string    `json:"component" yaml:"component"`
	ValuesFile string    `json:"valuesFile" yaml:"valuesFile"`
	Platform   *Platform `json:"platform,omitempty" yaml:"platform,omitempty"`
	Write      Write     `json:"write" yaml:"write"`
}

Target names an existing values file and its supported identity layout.

type Write

type Write struct {
	Reference  string `json:"reference,omitempty" yaml:"reference,omitempty"`
	Repository string `json:"repository,omitempty" yaml:"repository,omitempty"`
	Digest     string `json:"digest,omitempty" yaml:"digest,omitempty"`
	ClearTag   string `json:"clearTag,omitempty" yaml:"clearTag,omitempty"`
}

Write supports a full reference or a split repository/digest, with tag clearing.

Jump to

Keyboard shortcuts

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