artifact

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package artifact provides neutral bundle archive assertions for tests.

Index

Constants

View Source
const BundleDefinitionMediaType = "application/vnd.defenseunicorns.uds.bundle.definition.v1"

BundleDefinitionMediaType identifies bundle-definition manifests (ADR-0007).

Variables

This section is empty.

Functions

This section is empty.

Types

type Entries

type Entries struct {
	Paths map[string]bool
	Small map[string][]byte
}

Entries contains every archive path and the contents of entries small enough to contain OCI indexes and manifests.

func Read

func Read(ctx context.Context, archivePath string) (entries Entries, err error)

Read reads the OCI metadata from a bundle archive without retaining large layers.

func (Entries) BlobPaths

func (e Entries) BlobPaths() map[string]struct{}

BlobPaths returns the archive paths for all OCI blob entries.

func (Entries) HasLayer

func (e Entries) HasLayer(title string) (bool, error)

HasLayer reports whether an OCI manifest has a titled layer whose blob exists.

func (Entries) HasLayerInArtifact

func (e Entries) HasLayerInArtifact(title, artifactType string) (bool, error)

HasLayerInArtifact reports whether an OCI artifact manifest has a titled layer whose blob exists.

func (Entries) LayerInArtifact

func (e Entries) LayerInArtifact(title, artifactType string) ([]byte, error)

LayerInArtifact returns a titled layer from a manifest of the given artifact type.

func (Entries) PackageManifestDigests

func (e Entries) PackageManifestDigests() (map[string]struct{}, error)

PackageManifestDigests returns all non-definition manifest digests.

Jump to

Keyboard shortcuts

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