ocipull

package
v4.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLocalBlob

func GetLocalBlob(ctx context.Context, path string) (*types.BlobInfo, error)

func GetRemoteDescriptor

func GetRemoteDescriptor(ctx context.Context, dest string) (*specV1.Descriptor, error)

func GetRemoteManifest

func GetRemoteManifest(ctx context.Context, dest string) (*specV1.Manifest, error)

func Pull

func Pull(ctx context.Context, imageInput string, sourcePath string, options PullOptions) error

Pull `imageInput` from a container registry to `sourcePath`.

func ReadImageManifestFromOCIPath

func ReadImageManifestFromOCIPath(ctx context.Context, ociImagePath string) (*specV1.Manifest, error)

func StripOCIReference

func StripOCIReference(input string) string

Types

type Disker

type Disker interface {
	Pull() error
	Decompress(compressedFile *define.VMFile) (*define.VMFile, error)
	DiskEndpoint() string
	Unpack() (*define.VMFile, error)
}

type LocalBlobDir

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

func NewOCIDir

func NewOCIDir(ctx context.Context, inputDir, machineImageDir, vmName string) *LocalBlobDir

func (*LocalBlobDir) Decompress

func (l *LocalBlobDir) Decompress(compressedFile *define.VMFile) (*define.VMFile, error)

func (*LocalBlobDir) DiskEndpoint

func (l *LocalBlobDir) DiskEndpoint() string

func (*LocalBlobDir) LocalBlob

func (l *LocalBlobDir) LocalBlob() *types.BlobInfo

func (*LocalBlobDir) Pull

func (l *LocalBlobDir) Pull() error

func (*LocalBlobDir) Unpack

func (l *LocalBlobDir) Unpack() (*define.VMFile, error)

type OCIKind

type OCIKind string
var (
	OCIDir      OCIKind = "oci-dir"
	OCIRegistry OCIKind = "docker"
	OCIUnknown  OCIKind = "unknown"
)

func (OCIKind) IsOCIDir

func (o OCIKind) IsOCIDir() bool

func (OCIKind) String

func (o OCIKind) String() string

type OCIOpts

type OCIOpts struct {
	Scheme *OCIKind
	Dir    *string
}

type OSVersion

type OSVersion struct {
	*semver.Version
}

type PullOptions

type PullOptions struct {
	// Require HTTPS and verify certificates when accessing the registry.
	TLSVerify bool
	// [username[:password] to use when connecting to the registry.
	Credentials string
	// Quiet the progress bars when pushing.
	Quiet bool
}

PullOptions includes data to alter certain knobs when pulling a source image.

type Versioned

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

func NewVersioned

func NewVersioned(ctx context.Context, machineImageDir, vmName string) (*Versioned, error)

func (*Versioned) Decompress

func (d *Versioned) Decompress(compressedFile *define.VMFile) (*define.VMFile, error)

func (*Versioned) DiskEndpoint

func (d *Versioned) DiskEndpoint() string

func (*Versioned) LocalBlob

func (d *Versioned) LocalBlob() *types.BlobInfo

func (*Versioned) Pull

func (d *Versioned) Pull() error

func (*Versioned) Unpack

func (d *Versioned) Unpack() (*define.VMFile, error)

Jump to

Keyboard shortcuts

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