imagetools

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 41 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsOCILayout added in v0.33.0

func IsOCILayout(s string) bool

func RegistryAuthForRef added in v0.5.0

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

Types

type DescWithSource added in v0.30.0

type DescWithSource struct {
	ocispecs.Descriptor
	Source *Source
}

type Location added in v0.33.0

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

func ParseLocation added in v0.33.0

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

func (*Location) Digest added in v0.33.0

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

func (*Location) IsOCILayout added in v0.33.0

func (l *Location) IsOCILayout() bool

func (*Location) IsRegistry added in v0.33.0

func (l *Location) IsRegistry() bool

func (*Location) Kind added in v0.33.0

func (l *Location) Kind() LocationKind

func (*Location) Name added in v0.33.0

func (l *Location) Name() string

func (*Location) Named added in v0.33.0

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

func (*Location) OCILayout added in v0.33.0

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

func (*Location) String added in v0.33.0

func (l *Location) String() string

func (*Location) Tag added in v0.33.0

func (l *Location) Tag() string

func (*Location) TagNameOnly added in v0.33.0

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

func (*Location) ValidateTargetDigest added in v0.33.0

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

func (*Location) WithDigest added in v0.33.0

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

func (*Location) WithTag added in v0.33.0

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

type LocationKind added in v0.33.0

type LocationKind int
const (
	LocationKindRegistry LocationKind = iota
	LocationKindOCILayout
)

type Opt

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

type Printer added in v0.8.0

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

func NewPrinter added in v0.8.0

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

func (*Printer) Print added in v0.8.0

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 added in v0.9.0

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

func (*Resolver) CopyWithIngester added in v0.33.0

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 added in v0.33.0

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

func (*Resolver) Fetcher added in v0.33.0

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 added in v0.33.0

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 added in v0.9.0

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

Jump to

Keyboard shortcuts

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