image

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Image

type Image interface {
	Layer
	Manifest(ctx context.Context) (*ocispec.Manifest, error)
	Config(ctx context.Context) (Layer, error)
	Layers(ctx context.Context) ([]Layer, error)
}

func Copy

func Copy(ctx context.Context, dst Sink, src Source, ref string) (Image, error)

type Layer

type Layer interface {
	Descriptor() ocispec.Descriptor
	Content(ctx context.Context) (io.ReadCloser, error)
}

func AsWriteLayers

func AsWriteLayers(ctx context.Context, img Image) ([]Layer, error)

AsWriteLayers spreads the given Image to all layers. The first layer will be the config, then the 'regular' layers and finally the image manifest.

type Sink

type Sink interface {
	Push(ctx context.Context, ref string, img Image) error
}

type Source

type Source interface {
	Resolve(ctx context.Context, ref string) (Image, error)
}

Jump to

Keyboard shortcuts

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