registry

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCredentialFunc

func NewCredentialFunc() (auth.CredentialFunc, error)

NewCredentialFunc returns an auth.CredentialFunc backed by the Docker credential resolution chain (credHelpers -> credsStore -> auths).

Types

type Client

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

Client provides OCI registry access with credential-based auth via oras-go.

func NewClient

func NewClient(registryURL string, credFunc auth.CredentialFunc) *Client

func NewClientWithFetcher

func NewClientWithFetcher(registryURL string, credFunc auth.CredentialFunc, fetcher Fetcher) *Client

func (*Client) DefinitionVersion

func (c *Client) DefinitionVersion(ctx context.Context, modulePath string) (string, string, error)

func (*Client) NewRemoteRepository

func (c *Client) NewRemoteRepository(ctx context.Context, policyID string) (*remote.Repository, error)

NewRemoteRepository creates an authenticated oras-go remote.Repository for use as the source argument to oras.Copy().

type Fetcher

type Fetcher interface {
	DefinitionVersion(ctx context.Context, modulePath string) (string, string, error)
}

Fetcher abstracts registry access for testing without a live OCI registry.

Jump to

Keyboard shortcuts

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