Documentation ¶
Overview ¶
Package reference is a fork of the upstream docker/docker/reference package. The package is forked because we need consistency especially when storing and checking signatures (RH patches break this consistency because they modify docker/docker/reference as part of a patch carried in projectatomic/docker). The version of this package is v1.12.1 from upstream, update as necessary.
Index ¶
Constants ¶
const ( // DefaultTag defines the default tag used when performing images related actions and no tag or digest is specified DefaultTag = "latest" // DefaultHostname is the default built-in hostname DefaultHostname = "docker.io" // LegacyDefaultHostname is automatically converted to DefaultHostname LegacyDefaultHostname = "index.docker.io" // DefaultRepoPrefix is the prefix used for default repositories in default host DefaultRepoPrefix = "library/" )
Variables ¶
This section is empty.
Functions ¶
func IsNameOnly ¶
IsNameOnly returns true if reference only contains a repo name.
Types ¶
type Canonical ¶
Canonical reference is an object with a fully unique name including a name with hostname and digest
type Named ¶
type Named interface { // Name returns normalized repository name, like "ubuntu". Name() string // String returns full reference, like "ubuntu@sha256:abcdef..." String() string // FullName returns full repository name with hostname, like "docker.io/library/ubuntu" FullName() string // Hostname returns hostname for the reference, like "docker.io" Hostname() string // RemoteName returns the repository component of the full name, like "library/ubuntu" RemoteName() string }
Named is an object with a full name
func ParseIDOrReference ¶
ParseIDOrReference parses string for an image ID or a reference. ID can be without a default prefix.
func ParseNamed ¶
ParseNamed parses s and returns a syntactically valid reference implementing the Named interface. The reference must have a name, otherwise an error is returned. If an error was encountered it is returned, along with a nil Reference.
func WithDefaultTag ¶
WithDefaultTag adds a default tag to a reference if it only has a repo name.
type NamedTagged ¶
NamedTagged is an object including a name and tag.