remote

package
v0.0.0-...-4a96f40 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 36 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownRegistry = errors.New("unknown registry")

Functions

func Do

func Do[Data any, Op interface{ ResponseData() Data }](ctx context.Context, c courier.Client, req Op, metas ...courier.Metadata) (Data, courier.Metadata, error)

func New

func New(ctx context.Context, registryResolver RegistryResolver, options ...Option) (content.Namespace, error)

Types

type Client

type Client struct {
	Registry

	RoundTripperCreateFunc client.RoundTripperCreateFunc
	// contains filtered or unexported fields
}

func (*Client) Do

func (c *Client) Do(ctx context.Context, req any, metas ...courier.Metadata) courier.Result

func (*Client) GetEndpoint

func (c *Client) GetEndpoint() string

func (*Client) Init

func (c *Client) Init(ctx context.Context) error

type Option

type Option func(n *namespace)

type Registry

type Registry struct {
	// Remote container registry endpoint
	Endpoint string `flag:",omitzero"`
	// Remote container registry username
	Username string `flag:",omitzero"`
	// Remote container registry password
	Password string `flag:",omitzero,secret"`
}

func (Registry) Resolve

type RegistryAuth

type RegistryAuth struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type RegistryClient

type RegistryClient struct {
	// https cert (pem-encoded)
	ClientCertificateData []byte `json:"certificateData,omitzero"`
	// https key (pem-encoded)
	ClientKeyData []byte `json:"keyData,omitzero"`
	// https skip
	SkipVerify bool `json:"skipVerify,omitzero"`
}

type RegistryHost

type RegistryHost struct {
	Server                   string          `json:"server"`
	Auth                     *RegistryAuth   `json:"auth,omitzero"`
	CertificateAuthorityData []byte          `json:"certificateAuthorityData,omitzero"`
	Client                   *RegistryClient `json:"client,omitzero"`
}

type RegistryHosts

type RegistryHosts map[string]RegistryHost

func (RegistryHosts) Resolve

func (hosts RegistryHosts) Resolve(ctx context.Context, named reference.Named) (reference.Named, *RegistryHost, error)

type RegistryResolver

type RegistryResolver interface {
	Resolve(ctx context.Context, named reference.Named) (reference.Named, *RegistryHost, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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