oci

package
v1.3.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package oci provides transparent caching of oci-like refs

Index

Constants

This section is empty.

Variables

View Source
var ArchMap = map[string]GoArch{
	"amd64": {
		Arch: "amd64",
		Var:  "",
	},
	"arm32v5": {
		Arch: "arm",
		Var:  "v5",
	},
	"arm32v6": {
		Arch: "arm",
		Var:  "v6",
	},
	"arm32v7": {
		Arch: "arm",
		Var:  "v7",
	},
	"arm64v8": {
		Arch: "arm64",
		Var:  "v8",
	},
	"386": {
		Arch: "386",
		Var:  "",
	},
	"ppc64le": {
		Arch: "ppc64le",
		Var:  "",
	},
	"s390x": {
		Arch: "s390x",
		Var:  "",
	},
}

Functions

func ConvertArch added in v1.2.0

func ConvertArch(arch, archVariant string) (string, error)

Convert CLI options GOARCH and arch variant to recognized docker arch

func ConvertReference

func ConvertReference(ctx context.Context, imgCache *cache.Handle, src types.ImageReference, sys *types.SystemContext) (types.ImageReference, error)

ConvertReference converts a source reference into a cache.ImageReference to cache its blobs

func ImageDigest added in v1.0.2

func ImageDigest(ctx context.Context, uri string, sys *types.SystemContext) (digest string, err error)

ImageDigest obtains the digest of a uri's manifest

func ParseImageName

func ParseImageName(ctx context.Context, imgCache *cache.Handle, uri string, sys *types.SystemContext) (types.ImageReference, error)

ParseImageName parses a uri (e.g. docker://ubuntu) into it's transport:reference combination and then returns the proper reference

Types

type GoArch added in v1.2.0

type GoArch struct {
	Arch string
	Var  string
}

type ImageReference

type ImageReference struct {
	types.ImageReference
	// contains filtered or unexported fields
}

ImageReference wraps containers/image ImageReference type

func (*ImageReference) NewImageSource

func (t *ImageReference) NewImageSource(ctx context.Context, sys *types.SystemContext) (types.ImageSource, error)

NewImageSource wraps the cache's oci-layout ref to first download the real source image to the cache

Jump to

Keyboard shortcuts

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