oci

package
v0.0.0-...-4298abe Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigMediaType  MediaType = mediaTypePrefix + ".config.v1alpha1+json"
	ContentMediaType MediaType = mediaTypePrefix + ".content.v1alpha1.tar+gzip"
	AttestMediaType  MediaType = mediaTypePrefix + ".attest.v1alpha1.jsonl+gzip"

	ContentInterpreterAnnotation   = mediaTypePrefix + ".content-interpreter.v1alpha1"
	ContentInterpreterKubectlApply = mediaTypePrefix + ".kubectl-apply.v1alpha1.tar+gzip"

	AttestationsSummaryAnnotation = mediaTypePrefix + ".attestations-summary.v1alpha1"

	OCIManifestSchema1 = typesv1.OCIManifestSchema1
)
View Source
const (
	UserAgent = "tape/v1"
)

Variables

This section is empty.

Functions

func IsCosignArtifact

func IsCosignArtifact(ref string) bool

func SemVerTagsFromAttestations

func SemVerTagsFromAttestations(ctx context.Context, tag name.Tag, sourceAttestations ...attestTypes.Statement) []name.Tag

Types

type ArtefactInfo

type ArtefactInfo struct {
	io.ReadCloser

	MediaType   MediaType
	Annotations map[string]string
	Digest      string
}

type Client

type Client struct {
	*ociclient.Client
	// contains filtered or unexported fields
}

func NewClient

func NewClient(opts []crane.Option) *Client

func NewDebugClient

func NewDebugClient(debugWriter io.Writer, opts []crane.Option) *Client

func (*Client) BuildArtefact

func (c *Client) BuildArtefact(artifactPath,
	sourceDir string, output io.Writer) error

based on https://github.com/fluxcd/pkg/blob/2a323d771e17af02dee2ccbbb9b445b78ab048e5/oci/client/build.go

func (*Client) BuildAttestations

func (c *Client) BuildAttestations(statements []attestTypes.Statement) (Layer, error)

func (*Client) Copy

func (c *Client) Copy(ctx context.Context, srcRef, dstRef, digest string) error

func (*Client) Digest

func (c *Client) Digest(ctx context.Context, ref string) (string, error)

func (*Client) Fetch

func (c *Client) Fetch(ctx context.Context, ref string, mediaTypes ...MediaType) ([]*ArtefactInfo, error)

func (*Client) FetchFromIndexOrImage

func (c *Client) FetchFromIndexOrImage(ctx context.Context, imageIndex ImageIndex, indexManifest *IndexManifest, image Image, mediaTypes ...MediaType) ([]*ArtefactInfo, map[Hash]*Manifest, error)

func (*Client) GetIndexOrImage

func (c *Client) GetIndexOrImage(ctx context.Context, ref string) (v1.ImageIndex, *v1.IndexManifest, v1.Image, error)

func (*Client) GetSingleArtefact

func (c *Client) GetSingleArtefact(ctx context.Context, ref string) (*ArtefactInfo, error)

func (*Client) ListRelated

func (c *Client) ListRelated(ctx context.Context, ref, digest string) ([]Metadata, error)

func (*Client) Pull

func (c *Client) Pull(ctx context.Context, ref string) (v1.Image, error)

func (*Client) PushArtefact

func (c *Client) PushArtefact(ctx context.Context, destinationRef, sourceDir string, timestamp *time.Time, sourceAttestations ...attestTypes.Statement) (*PackageRefs, error)

based on https://github.com/fluxcd/pkg/blob/2a323d771e17af02dee2ccbbb9b445b78ab048e5/oci/client/push.go

type Descriptor

type Descriptor = v1.Descriptor

type Hash

type Hash = v1.Hash

type Image

type Image = v1.Image

type ImageIndex

type ImageIndex = v1.ImageIndex

type IndexManifest

type IndexManifest = v1.IndexManifest

type Layer

type Layer = v1.Layer

type Manifest

type Manifest = v1.Manifest

type MediaType

type MediaType = typesv1.MediaType

type Metadata

type Metadata = ociclient.Metadata

type PackageRefs

type PackageRefs struct {
	Digest  string
	Primary string
	Short   string
	SemVer  []string
}

func (*PackageRefs) String

func (p *PackageRefs) String() string

type Platform

type Platform = v1.Platform

Jump to

Keyboard shortcuts

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