ociutil

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package ociutil provides utility functions for interacting with OCI registries.

Index

Constants

View Source
const (
	// GitUserAgent is used by git-remote-oci.
	GitUserAgent = "git-remote-oci"
	// GitLFSUserAgent is used by git-lfs-remote-oci.
	GitLFSUserAgent = "git-lfs-remote-oci"
)

Variables

This section is empty.

Functions

func NewGraphTarget

func NewGraphTarget(ctx context.Context, ref registry.Reference, opts *RepositoryOptions) (oras.GraphTarget, error)

NewGraphTarget creates an oras.GraphTarget.

TODO: Due to a need to support special use cases, we'll likely need to define a configuration file.

Types

type RepositoryOptions

type RepositoryOptions struct {
	// UserAgent used for outbound HTTP requests.
	UserAgent string
	// PlainHTTP enables basic HTTP
	PlainHTTP bool
	// NonCompliant indicates a registry is not OCI compliant. Primarily used
	// for non-compliant auth handling, e.g. artifactory.
	NonCompliant bool
	// RegistryCreds is a credential store for bearer tokens used for authenticating
	// with private registries. The standard $DOCKER_CONFIG/config.json, defaulting
	// to $HOME/.docker/config.json, is used if empty.
	RegistryCreds credentials.Store
}

RepositoryOptions provides configuration options for registry/repository connections.

Jump to

Keyboard shortcuts

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