Documentation
¶
Overview ¶
Package artifact defines the neutral release inventory and catalog bindings.
Index ¶
- Constants
- func Account(inventory *Inventory, bindings *Bindings) error
- func Invalid(reason, message string) error
- func Pointer(pointer string) ([]string, error)
- func ValidateBindings(bindings *Bindings) error
- func ValidateProvenance(p *Provenance) error
- type Applied
- type Bindings
- type Chart
- type Identity
- type Ignored
- type IgnoredIdentity
- type Image
- type Inventory
- type Metadata
- type Options
- type Platform
- type Provenance
- type Target
- type Write
Constants ¶
const ( APIVersion = header.AuthoringGroupVersion InventoryKind = "ArtifactInventory" BindingsKind = "ArtifactBindings" )
Variables ¶
This section is empty.
Functions ¶
func ValidateBindings ¶
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 ¶
Merge replaces whole dispositions by artifact name, including across kinds. Inputs are never changed. Target slices are copied to isolate composed writes.
func ParseBindings ¶
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 ¶
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.
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.