oci

package
v0.0.46 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package oci contains the OCI client interface and implementation.

Index

Constants

View Source
const Scheme = "oci://"

Scheme is the URI scheme for an OCI registry.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is an interface for interacting with an OCI registry.

func NewOCIClient

func NewOCIClient(opts ...Option) *Client

NewOCIClient creates a new OCI client with the given options.

func (Client) PullChart

func (c Client) PullChart(opts ImageOptions) error

PullChart pulls a Helm chart from the given ImageOptions.

func (Client) PullImage

func (c Client) PullImage(ref name.Reference) ([]v1.Layer, error)

PullImage pulls an image from the given name.Reference.

func (Client) WriteLayer

func (c Client) WriteLayer(layer v1.Layer, path string, opts ImageOptions) error

WriteLayer writes a layer to the filesystem.

type ImageOptions

type ImageOptions struct {
	Ref     string
	OutDir  string
	OutFile string
}

ImageOptions defines the options for pulling an image.

type Option

type Option func(*Client)

Option is a functional option for configuring the OCI client.

func WithMultiAuth

func WithMultiAuth() Option

WithMultiAuth configures the OCI client with multiple authentication keychains.

func WithTLSConfig

func WithTLSConfig(insecureSkipTLSVerify bool, caFile string) Option

WithTLSConfig configures the OCI client with the given TLS options.

Jump to

Keyboard shortcuts

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