uri

package
v3.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2018 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Library is the keyword for a library ref
	Library = "library"
	// Shub is the keyword for a shub ref
	Shub = "shub"
)

Variables

This section is empty.

Functions

func NameFromURI

func NameFromURI(uri string) string

NameFromURI turns a transport:ref URI into a name containing the top-level identifier of the image. For example, docker://godlovedc/lolcow returns lolcow

Returns "" when not in transport:ref format

func SplitURI

func SplitURI(uri string) (transport string, ref string)

SplitURI splits a URI into it's components which can be used directly through containers/image

Examples:

docker://ubuntu -> docker, //ubuntu
docker://ubuntu:18.04 -> docker, //ubuntu:18.04
oci-archive:path/to/archive -> oci-archive, path/to/archive
ubuntu -> "", ubuntu

Types

This section is empty.

Jump to

Keyboard shortcuts

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