Documentation ¶
Overview ¶
Package image is concerned with docker image names and digests
Index ¶
- type Digest
- type Name
- func (img Name) Digest() Digest
- func (img Name) Host() string
- func (img Name) Name() string
- func (img Name) Normalize() Name
- func (img Name) Path() string
- func (img Name) String() string
- func (img Name) Synonyms() []Name
- func (img Name) Tag() string
- func (img Name) WithDigest(digest Digest) (Name, error)
- func (img Name) WithTag(tag string) (Name, error)
- func (img Name) WithoutDigest() Name
- func (img Name) WithoutTagOrDigest() Name
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Digest ¶
type Digest struct {
// contains filtered or unexported fields
}
Digest provides a CAS address of an image (either an image manifest or a manifest list).
var EmptyDigest Digest
EmptyDigest is an invalid, zero value for Digest.
type Name ¶
type Name struct {
// contains filtered or unexported fields
}
Name is a named image reference. It can refer to an image manifest or a manifest list (e.g. a multi-arch image).
var EmptyName Name
EmptyName is an invalid, zero value for Name.
func NewName ¶
NewName returns the Name for the given image reference or an error if the image reference is invalid.
func (Name) Digest ¶
Digest returns the digest of the Name or EmptyDigest if the Name does not have a digest.
func (Name) Normalize ¶
Normalize returns a fully-qualified equivalent to the Name. Useful on synonyms.
func (Name) Synonyms ¶
Synonyms returns the image names equivalent to a given image name. A synonym is not necessarily normalized: in particular it may not have a host name.
func (Name) WithDigest ¶
WithDigest returns a new Name with the same value as the Name, but with the given digest. It returns an error if and only if the digest is invalid.
func (Name) WithTag ¶
WithTag returns a new Name with the same value as the Name, but with the given tag. It returns an error if and only if the tag is invalid.
func (Name) WithoutDigest ¶
WithoutDigest returns a new Name with the same value as the Name, but with any digest removed. It preserves any tag.
func (Name) WithoutTagOrDigest ¶
WithoutTagOrDigest returns a new Name with the same value as the Name, but with any tag or digest removed.