util

package
v0.0.0-...-66c752b Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// RegistryDefaultPathPrefix contains a per-registry listing of default prefixes
	// to prepend to image names that only contain a single path component.
	RegistryDefaultPathPrefix = map[string]string{
		"index.docker.io": "library",
		"docker.io":       "library",
	}
)

Functions

func AddImageNames

func AddImageNames(store storage.Store, image *storage.Image, addNames []string) error

AddImageNames adds the specified names to the specified image.

func ExpandNames

func ExpandNames(names []string) ([]string, error)

ExpandNames takes unqualified names, parses them as image names, and returns the fully expanded result, including a tag. Names which don't include a registry name will be marked for the most-preferred registry (i.e., the first one in our configuration).

func FindImage

func FindImage(store storage.Store, image string) (*storage.Image, error)

FindImage locates the locally-stored image which corresponds to a given name.

func GetFailureCause

func GetFailureCause(err, defaultError error) error

GetFailureCause checks the type of the error "err" and returns a new error message that reflects the reason of the failure. In case err type is not a familiar one the error "defaultError" is returned.

func ResolveName

func ResolveName(name string, firstRegistry string, sc *types.SystemContext, store storage.Store) []string

ResolveName checks if name is a valid image name, and if that name doesn't include a domain portion, returns a list of the names which it might correspond to in the registries.

Types

This section is empty.

Jump to

Keyboard shortcuts

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