package imagetools
import "github.com/docker/buildx/util/imagetools"
Index ¶
- func IsOCILayout(s string) bool
- func RegistryAuthForRef(ref string, auth authprovider.AuthConfigProvider) (string, error)
- type DescWithSource
- type Location
- func ParseLocation(s string) (*Location, error)
- func (l *Location) Digest() digest.Digest
- func (l *Location) IsOCILayout() bool
- func (l *Location) IsRegistry() bool
- func (l *Location) Kind() LocationKind
- func (l *Location) Name() string
- func (l *Location) Named() reference.Named
- func (l *Location) OCILayout() ocilayout.Ref
- func (l *Location) String() string
- func (l *Location) Tag() string
- func (l *Location) TagNameOnly() (*Location, error)
- func (l *Location) ValidateTargetDigest(desc digest.Digest) error
- func (l *Location) WithDigest(dgst digest.Digest) (*Location, error)
- func (l *Location) WithTag(tag string) (*Location, error)
- type LocationKind
- type Opt
- type Printer
- func NewPrinter(ctx context.Context, opt Opt, name string, format string) (*Printer, error)
- func (p *Printer) Print(raw bool, out io.Writer) error
- type Resolver
- func New(opt Opt) *Resolver
- 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 (r *Resolver) Copy(ctx context.Context, src *Source, dest *Location) error
- func (r *Resolver) CopyWithIngester(ctx context.Context, src *Source, dest *Location, ingester content.Ingester) error
- func (r *Resolver) FetchReferrers(ctx context.Context, loc *Location, dgst digest.Digest, opts ...remotes.FetchReferrersOpt) ([]ocispecs.Descriptor, error)
- func (r *Resolver) Fetcher(ctx context.Context, ref string) (remotes.Fetcher, error)
- func (r *Resolver) Get(ctx context.Context, in string) ([]byte, ocispecs.Descriptor, error)
- func (r *Resolver) GetDescriptor(ctx context.Context, loc *Location, desc ocispecs.Descriptor) ([]byte, error)
- func (r *Resolver) IngesterForLocation(ctx context.Context, loc *Location) (content.Ingester, error)
- func (r *Resolver) Push(ctx context.Context, ref *Location, desc ocispecs.Descriptor, dt []byte) error
- func (r *Resolver) Resolve(ctx context.Context, in string) (string, ocispecs.Descriptor, error)
- type Source
Functions ¶
func IsOCILayout ¶
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 (*Location) Digest ¶
func (*Location) IsOCILayout ¶
func (*Location) IsRegistry ¶
func (*Location) Kind ¶
func (l *Location) Kind() LocationKind
func (*Location) Name ¶
func (*Location) Named ¶
func (*Location) OCILayout ¶
func (*Location) String ¶
func (*Location) Tag ¶
func (*Location) TagNameOnly ¶
func (*Location) ValidateTargetDigest ¶
func (*Location) WithDigest ¶
func (*Location) WithTag ¶
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 (*Printer) Print ¶
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
func New ¶
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 (*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 (*Resolver) Get ¶
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 ¶
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.