resolver

package
v1.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCredentialsNotFound = errors.New("registry credentials not found")

Functions

This section is empty.

Types

type AuthSource

type AuthSource interface {
	Credentials(ctx context.Context, host string) (Credentials, error)
}

func NewSessionAuthSource

func NewSessionAuthSource(
	authProvider *auth.RegistryAuthProvider,
	getMainClientConn func(context.Context) (*grpc.ClientConn, error),
) AuthSource

type Credentials

type Credentials struct {
	Username string
	Secret   string
}

type NetworkConfig added in v0.21.6

type NetworkConfig struct {
	DNS         *oci.DNSConfig
	HostAliases map[string]string
}

NetworkConfig carries the Dagger DNS view used by registry operations for a container with service bindings.

type Opts

type Opts struct {
	Hosts        docker.RegistryHosts
	Auth         AuthSource
	ContentStore content.Store
	LeaseManager leases.Manager
}

type PullOpts

type PullOpts struct {
	Platform          ocispecs.Platform
	ResolveMode       ResolveMode
	LayerLimit        *int
	Network           NetworkConfig
	RegistryTransport RegistryTransport
}

type PulledImage

type PulledImage struct {
	Ref          string
	ManifestDesc ocispecs.Descriptor
	ConfigDesc   ocispecs.Descriptor
	Layers       []ocispecs.Descriptor
	Nonlayers    []ocispecs.Descriptor
	// contains filtered or unexported fields
}

func (*PulledImage) Release

func (img *PulledImage) Release(ctx context.Context) error

type PushOpts

type PushOpts struct {
	RegistryTransport RegistryTransport
	ByDigest          bool
	Network           NetworkConfig
}

type PushedImage

type PushedImage struct {
	RootDesc          ocispecs.Descriptor
	Provider          content.InfoReaderProvider
	SourceAnnotations map[digest.Digest]map[string]string
}

type RegistryProtocol

type RegistryProtocol string
const (
	RegistryProtocolHTTPS RegistryProtocol = "https"
	RegistryProtocolHTTP  RegistryProtocol = "http"
)

type RegistryTransport

type RegistryTransport struct {
	Protocol              RegistryProtocol
	InsecureSkipTLSVerify bool
}

func (RegistryTransport) CacheKey

func (transport RegistryTransport) CacheKey() string

type ResolveImageConfigOpts

type ResolveImageConfigOpts struct {
	Platform          *ocispecs.Platform
	ResolveMode       ResolveMode
	Network           NetworkConfig
	RegistryTransport RegistryTransport
}

type ResolveMode

type ResolveMode int
const (
	ResolveModeDefault ResolveMode = iota
	ResolveModeForcePull
)

type Resolver

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

func New

func New(opts Opts) *Resolver

func (*Resolver) Close

func (r *Resolver) Close() error

func (*Resolver) Pull

func (r *Resolver) Pull(ctx context.Context, ref string, opts PullOpts) (_ *PulledImage, rerr error)

func (*Resolver) PushImage

func (r *Resolver) PushImage(ctx context.Context, img *PushedImage, ref string, opts PushOpts) (rerr error)

func (*Resolver) ResolveImageConfig

func (r *Resolver) ResolveImageConfig(
	ctx context.Context,
	ref string,
	opts ResolveImageConfigOpts,
) (_ string, _ digest.Digest, _ []byte, rerr error)

Jump to

Keyboard shortcuts

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