registry

package
v2.0.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CredentialHelper

type CredentialHelper interface {
	GetCredentials(ctx context.Context, ref, host string) (Credentials, error)
}

From stream

type Credentials

type Credentials struct {
	Host     string
	Username string
	Secret   string
	Header   string
}

type OCIRegistry

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

OCI

func NewOCIRegistry

func NewOCIRegistry(ctx context.Context, ref string, opts ...Opt) (*OCIRegistry, error)

NewOCIRegistry initializes with hosts, authorizer callback, and headers

func (*OCIRegistry) Fetcher

func (r *OCIRegistry) Fetcher(ctx context.Context, ref string) (transfer.Fetcher, error)

func (*OCIRegistry) Image

func (r *OCIRegistry) Image() string

func (*OCIRegistry) MarshalAny

func (r *OCIRegistry) MarshalAny(ctx context.Context, sm streaming.StreamCreator) (typeurl.Any, error)

func (*OCIRegistry) Pusher

func (*OCIRegistry) Resolve

func (r *OCIRegistry) Resolve(ctx context.Context) (name string, desc ocispec.Descriptor, err error)

func (*OCIRegistry) String

func (r *OCIRegistry) String() string

func (*OCIRegistry) UnmarshalAny

func (r *OCIRegistry) UnmarshalAny(ctx context.Context, sm streaming.StreamGetter, a typeurl.Any) error

type Opt

type Opt func(o *registryOpts) error

Opt sets registry-related configurations.

func WithCredentials

func WithCredentials(creds CredentialHelper) Opt

WithCredentials configures a helper that provides credentials for a host.

func WithDefaultScheme

func WithDefaultScheme(s string) Opt

WithDefaultScheme specifies the default scheme for registry configuration

func WithHeaders

func WithHeaders(headers http.Header) Opt

WithHeaders configures HTTP request header fields sent by the resolver.

func WithHostDir

func WithHostDir(hostDir string) Opt

WithHostDir specifies the host configuration directory.

Jump to

Keyboard shortcuts

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