package imagetools

import "github.com/docker/buildx/util/imagetools"

Index

Functions

func IsOCILayout

func IsOCILayout(s string) bool

func RegistryAuthForRef

func RegistryAuthForRef(ref string, auth authprovider.AuthConfigProvider) (string, error)

Types

type DescWithSource

type DescWithSource struct {
	ocispecs.Descriptor
	Source *Source
}

type Location

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

func ParseLocation

func ParseLocation(s string) (*Location, error)

func (*Location) Digest

func (l *Location) Digest() digest.Digest

func (*Location) IsOCILayout

func (l *Location) IsOCILayout() bool

func (*Location) IsRegistry

func (l *Location) IsRegistry() bool

func (*Location) Kind

func (l *Location) Kind() LocationKind

func (*Location) Name

func (l *Location) Name() string

func (*Location) Named

func (l *Location) Named() reference.Named

func (*Location) OCILayout

func (l *Location) OCILayout() ocilayout.Ref

func (*Location) String

func (l *Location) String() string

func (*Location) Tag

func (l *Location) Tag() string

func (*Location) TagNameOnly

func (l *Location) TagNameOnly() (*Location, error)

func (*Location) ValidateTargetDigest

func (l *Location) ValidateTargetDigest(desc digest.Digest) error

func (*Location) WithDigest

func (l *Location) WithDigest(dgst digest.Digest) (*Location, error)

func (*Location) WithTag

func (l *Location) WithTag(tag string) (*Location, error)

type LocationKind

type LocationKind int
const (
	LocationKindRegistry LocationKind = iota
	LocationKindOCILayout
)

type Opt

type Opt struct {
	Auth           authprovider.AuthConfigProvider
	RegistryConfig map[string]resolver.RegistryConfig
}

type Printer

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

func NewPrinter

func NewPrinter(ctx context.Context, opt Opt, name string, format string) (*Printer, error)

func (*Printer) Print

func (p *Printer) Print(raw bool, out io.Writer) error

type Resolver

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

func New

func New(opt Opt) *Resolver

func (*Resolver) Combine

func (r *Resolver) Combine(ctx context.Context, srcs []*Source, ann map[exptypes.AnnotationKey]string, preferIndex bool, platforms []ocispecs.Platform) ([]byte, ocispecs.Descriptor, []DescWithSource, error)

func (*Resolver) Copy

func (r *Resolver) Copy(ctx context.Context, src *Source, dest *Location) error

func (*Resolver) CopyWithIngester

func (r *Resolver) CopyWithIngester(ctx context.Context, src *Source, dest *Location, ingester content.Ingester) error

CopyWithIngester copies a source manifest and its referrers to the destination using the provided ingester. Callers that issue multiple concurrent copies to the same destination should share a single ingester so that the underlying per-digest locking prevents duplicate blob pushes from racing against each other.

func (*Resolver) FetchReferrers

func (r *Resolver) FetchReferrers(ctx context.Context, loc *Location, dgst digest.Digest, opts ...remotes.FetchReferrersOpt) ([]ocispecs.Descriptor, error)

func (*Resolver) Fetcher

func (r *Resolver) Fetcher(ctx context.Context, ref string) (remotes.Fetcher, error)

func (*Resolver) Get

func (r *Resolver) Get(ctx context.Context, in string) ([]byte, ocispecs.Descriptor, error)

func (*Resolver) GetDescriptor

func (r *Resolver) GetDescriptor(ctx context.Context, loc *Location, desc ocispecs.Descriptor) ([]byte, error)

func (*Resolver) IngesterForLocation

func (r *Resolver) IngesterForLocation(ctx context.Context, loc *Location) (content.Ingester, error)

IngesterForLocation returns a content ingester for the given location. For registry locations a new pusher is created; for OCI layout locations the local content store is returned.

func (*Resolver) Push

func (r *Resolver) Push(ctx context.Context, ref *Location, desc ocispecs.Descriptor, dt []byte) error

func (*Resolver) Resolve

func (r *Resolver) Resolve(ctx context.Context, in string) (string, ocispecs.Descriptor, error)

type Source

type Source struct {
	Desc ocispecs.Descriptor
	Ref  *Location
}

Source Files

auth.go create.go inspect.go loader.go location.go ocilayout_referrers.go printers.go

Version
v0.33.0 (latest)
Published
Mar 31, 2026
Platform
linux/amd64
Imports
41 packages
Last checked
1 hour ago

Tools for package owners.