oci

package
v1.223.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package oci provides shared helpers for authenticating to OCI registries.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidFilePath = errors.New("invalid file path")
View Source
var ErrNoLayers = errors.New("the OCI image does not have any layers")

Functions

func GHCRAuth

func GHCRAuth(atmosConfig *schema.AtmosConfiguration) (authn.Authenticator, string)

GHCRAuth returns authentication credentials for GitHub Container Registry (ghcr.io) derived from Atmos settings, along with a human-readable source description. It returns (nil, "") when no usable credentials are configured so callers can fall back to anonymous access or the default keychain.

func ProcessImage

func ProcessImage(ctx context.Context, atmosConfig *schema.AtmosConfiguration, imageName string, destDir string) error

ProcessImage pulls an OCI image and extracts its layers to the specified destination directory. The context bounds the pull (registry auth plus manifest/layer fetch) -- callers should pass one with a deadline, matching the timeout the go-getter download path already enforces.

Types

This section is empty.

Directories

Path Synopsis
Package ocitest provides an in-process OCI registry for tests, so tests never depend on real network access or a real container registry.
Package ocitest provides an in-process OCI registry for tests, so tests never depend on real network access or a real container registry.

Jump to

Keyboard shortcuts

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