oci

package
v3.0.3-rc1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package oci provides transparent caching of oci-like refs

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertReference

func ConvertReference(src types.ImageReference, sys *types.SystemContext) (types.ImageReference, error)

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

func ImageSHA

func ImageSHA(uri string, sys *types.SystemContext) (string, error)

ImageSHA calculates the SHA of a uri's manifest

func IsSupported

func IsSupported(transport string) string

IsSupported returns whether or not the transport given is supported. To fit within a switch/case statement, this function will return transport if it is supported

func ParseImageName

func ParseImageName(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

func TempImageExists

func TempImageExists(uri string) (bool, string, error)

TempImageExists returns whether or not the uri exists splatted out in the cache.OciTemp() directory

Types

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