registry

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEndpoint

func GetEndpoint(
	ref reference.Named,
	repoInfo registry.RepositoryInfo,
) (
	_ *registry.APIEndpoint,
	err error,
)

GetEndpoint returns the endpoint associated with the reference

func PullFromDigest

func PullFromDigest(
	token dauth.Scope,
	ref reference.Named,
	d digest.Digest,
	bldr *v2.URLBuilder,
	dir string,
) (fn string, err error)

PullFromDigest downloads a blob (refereced by its digest) from the registry to a temporary file. It verifies that the downloaded file matches its digest, deleting if it does not. While the digest is used to name the file, it is first verified to be a valid digest, so this cannot lead to a file inclusion vulrenability.

func PullImage

func PullImage(
	token dauth.Scope,
	ref names.NamedTaggedRepository,
	endpoint *registry.APIEndpoint,
	opts *crypto.Opts,
	downloadDir string,
) (manifest *distribution.ImageManifest, err error)

PullImage pulls an image from a remote repository

func PullManifest

func PullManifest(
	token dauth.Scope,
	ref reference.Named,
	bldr *v2.URLBuilder,
	dir string,
) (_ *distribution.ImageManifest, err error)

PullManifest pulls a manifest from the registry and parses it

func PushImage

func PushImage(
	token dauth.Scope,
	ref reference.Named,
	manifest *distribution.ImageManifest,
	endpoint *registry.APIEndpoint,
) error

PushImage pushes the config, layers and mainifest to the nominated registry, in that order

func PushLayer

func PushLayer(
	token dauth.Scope,
	ref reference.Named,
	layer distribution.Blob,
	endpoint *registry.APIEndpoint,
) (err error)

PushLayer pushes a layer to the registry, checking if it exists

func PushManifest

func PushManifest(
	token dauth.Scope,
	ref reference.Named,
	manifest *distribution.ImageManifest,
	endpoint *registry.APIEndpoint,
) (_ string, err error)

PushManifest puts a manifest on the registry

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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