Documentation ¶
Overview ¶
Package boci (bundle OCI) provides OCI utility functions for bundles
Index ¶
- func CopyLayers(layersToPull []ocispec.Descriptor, estimatedBytes int64, tmpDstDir string, ...) (ocispec.Descriptor, error)
- func CreateCopyOpts(layersToPull []ocispec.Descriptor, concurrency int) oras.CopyOptions
- func EnsureOCIPrefix(source string) string
- func FilterImageIndex(components []v1alpha1.ZarfComponent, imgIndex ocispec.Index) ([]ocispec.Descriptor, error)
- func FindBundledPkgLayers(ctx context.Context, pkg types.Package, rootManifest *oci.Manifest, ...) ([]ocispec.Descriptor, int64, error)
- func FindPkgLayers(remote zoci.Remote, pkgRootManifest *oci.Manifest, optionalComponents []string) ([]ocispec.Descriptor, error)
- func GetIndex(remote *oci.OrasRemote, ref string) (*ocispec.Index, error)
- func ToOCIRemote(t any, mediaType string, remote *oci.OrasRemote) (*ocispec.Descriptor, error)
- func ToOCIStore(t any, mediaType string, store *ocistore.Store) (ocispec.Descriptor, error)
- func UpdateIndex(index *ocispec.Index, remote *oci.OrasRemote, bundle *types.UDSBundle, ...) error
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 ¶
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 ¶
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 ¶
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.