Documentation
¶
Overview ¶
Package reference to manipulate image references.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidImageReference indicates that the image reference is invalid. ErrInvalidImageReference = errors.New("invalid image reference") // ErrInvalidPattern indicates that the pattern used to parse the image reference is invalid. ErrInvalidPattern = errors.New("invalid pattern") )
Functions ¶
This section is empty.
Types ¶
type ImageReference ¶
type ImageReference struct {
Protocol Protocol
Digest digest.Digest
Tag string
ExplicitTag string
Path string
Domain string
// contains filtered or unexported fields
}
ImageReference represents a reference to an image, which may include a protocol, domain, path, tag, and digest.
func Parse ¶
func Parse(rawRef string) (*ImageReference, error)
Parse parses a raw image reference string and returns an ImageReference object.
func (*ImageReference) FamiliarMatch ¶
func (ir *ImageReference) FamiliarMatch(pattern string) (bool, error)
FamiliarMatch checks if the image reference matches a familiar pattern.
func (*ImageReference) FamiliarName ¶
func (ir *ImageReference) FamiliarName() string
FamiliarName returns a familiar (eg: shortened) name for the image reference.
func (*ImageReference) Name ¶
func (ir *ImageReference) Name() string
Name returns the name of the image reference, including the domain and path.
func (*ImageReference) String ¶
func (ir *ImageReference) String() string
String returns the string representation of the image reference.
func (*ImageReference) SuggestContainerName ¶
func (ir *ImageReference) SuggestContainerName(suffix string) string
SuggestContainerName generates a suggested container name based on the image reference.
Click to show internal directories.
Click to hide internal directories.