boci

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: AGPL-3.0 Imports: 26 Imported by: 0

Documentation

Overview

Package boci (bundle OCI) provides OCI utility functions for bundles

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyLayers added in v0.13.0

func CopyLayers(layersToPull []ocispec.Descriptor, estimatedBytes int64, tmpDstDir string, repo *remote.Repository, target oras.Target, artifactName string) (ocispec.Descriptor, error)

CopyLayers uses ORAS to copy layers from a remote repo to a local OCI store

func CreateCopyOpts

func CreateCopyOpts(layersToPull []ocispec.Descriptor, concurrency int) oras.CopyOptions

CreateCopyOpts creates the ORAS CopyOpts struct to use when copying OCI artifacts

func EnsureOCIPrefix

func EnsureOCIPrefix(source string) string

EnsureOCIPrefix ensures oci prefix is part of provided remote source path, and adds it if it's not

func FilterImageIndex

func FilterImageIndex(components []v1alpha1.ZarfComponent, imgIndex ocispec.Index) ([]ocispec.Descriptor, error)

FilterImageIndex filters out optional components from the images index

func FindBundledPkgLayers

func FindBundledPkgLayers(ctx context.Context, pkg types.Package, rootManifest *oci.Manifest, remote *oci.OrasRemote) ([]ocispec.Descriptor, int64, error)

FindBundledPkgLayers finds the necessary Zarf pkg layers from a remote bundle

func FindPkgLayers

func FindPkgLayers(remote zoci.Remote, pkgRootManifest *oci.Manifest, optionalComponents []string) ([]ocispec.Descriptor, error)

FindPkgLayers finds the necessary Zarf pkg layers from a remote OCI registry

func GetIndex

func GetIndex(remote *oci.OrasRemote, ref string) (*ocispec.Index, error)

GetIndex gets the OCI index from a remote repository if the index exists, otherwise returns a

func ToOCIRemote

func ToOCIRemote(t any, mediaType string, remote *oci.OrasRemote) (*ocispec.Descriptor, error)

ToOCIRemote takes an arbitrary type, typically a struct, marshals it into JSON and store it in a remote OCI store

func ToOCIStore

func ToOCIStore(t any, mediaType string, store *ocistore.Store) (ocispec.Descriptor, error)

ToOCIStore takes an arbitrary type, typically a struct, marshals it into JSON and store it in a local OCI store

func UpdateIndex

func UpdateIndex(index *ocispec.Index, remote *oci.OrasRemote, bundle *types.UDSBundle, newManifestDesc ocispec.Descriptor) error

UpdateIndex updates or creates a new OCI index based on the index arg, then pushes to the remote OCI repo

Types

This section is empty.

Jump to

Keyboard shortcuts

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