Documentation ¶
Index ¶
- Constants
- Variables
- func DigestOrImageMatch(image, imageID string) bool
- func ImageWithMetadata(image *imagev1.Image) error
- func ImageWithMetadataOrDie(image *imagev1.Image)
- func JoinImageStreamImage(name, id string) string
- func JoinImageStreamTag(name, tag string) string
- func LatestTaggedImage(stream *imagev1.ImageStream, tag string) *imagev1.TagEvent
- func ParseDockerImageReference(spec string) (imagev1.DockerImageReference, error)
- func ParseImageStreamImageName(input string) (name string, id string, err error)
- func ParseImageStreamTagName(istag string) (name string, tag string, err error)
- func PrioritizeTags(tags []string)
- func ResolveLatestTaggedImage(stream *imagev1.ImageStream, tag string) (string, bool)
- func SpecHasTag(stream *imagev1.ImageStream, name string) (imagev1.TagReference, bool)
- func SplitImageStreamImage(nameAndID string) (name string, id string, ok bool)
- func SplitImageStreamTag(nameAndTag string) (name string, tag string, ok bool)
- func StatusHasTag(stream *imagev1.ImageStream, name string) (imagev1.NamedTagEventList, bool)
Constants ¶
const (
// DefaultImageTag is used when an image tag is needed and the configuration does not specify a tag to use.
DefaultImageTag = "latest"
)
Variables ¶
var ParseDigest = digestinternal.ParseDigest
Functions ¶
func DigestOrImageMatch ¶
DigestOrImageMatch matches the digest in the image name.
func ImageWithMetadata ¶
ImageWithMetadata mutates the given image. It parses raw DockerImageManifest data stored in the image and fills its DockerImageMetadata and other fields. Copied from github.com/openshift/image-registry/pkg/origin-common/util/util.go
func ImageWithMetadataOrDie ¶
func JoinImageStreamImage ¶
JoinImageStreamImage creates a name for image stream image object from an image stream name and an id.
func JoinImageStreamTag ¶
JoinImageStreamTag turns a name and tag into the name of an ImageStreamTag
func LatestTaggedImage ¶
func LatestTaggedImage(stream *imagev1.ImageStream, tag string) *imagev1.TagEvent
LatestTaggedImage returns the most recent TagEvent for the specified image repository and tag. Will resolve lookups for the empty tag. Returns nil if tag isn't present in stream.status.tags.
func ParseDockerImageReference ¶
func ParseDockerImageReference(spec string) (imagev1.DockerImageReference, error)
ParseDockerImageReference parses a Docker pull spec string into a DockerImageReference.
func ParseImageStreamImageName ¶
ParseImageStreamImageName splits a string into its name component and ID component, and returns an error if the string is not in the right form.
func ParseImageStreamTagName ¶
ParseImageStreamTagName splits a string into its name component and tag component, and returns an error if the string is not in the right form.
func PrioritizeTags ¶
func PrioritizeTags(tags []string)
PrioritizeTags orders a set of image tags with a few conventions:
1. the "latest" tag, if present, should be first 2. any tags that represent a semantic minor version ("5.1", "v5.1", "v5.1-rc1") should be next, in descending order 3. any tags that represent a full semantic version ("5.1.3-other", "v5.1.3-other") should be next, in descending order 4. any remaining tags should be sorted in lexicographic order
The method updates the tags in place.
func ResolveLatestTaggedImage ¶
func ResolveLatestTaggedImage(stream *imagev1.ImageStream, tag string) (string, bool)
ResolveLatestTaggedImage returns the appropriate pull spec for a given tag in the image stream, handling the tag's reference policy if necessary to return a resolved image. Callers that transform an ImageStreamTag into a pull spec should use this method instead of LatestTaggedImage.
func SpecHasTag ¶
func SpecHasTag(stream *imagev1.ImageStream, name string) (imagev1.TagReference, bool)
SpecHasTag returns named tag from image stream's spec and boolean whether one was found.
func SplitImageStreamImage ¶
SplitImageStreamImage turns the name of an ImageStreamImage into Name and ID. It returns false if the ID was not properly specified in the name.
func SplitImageStreamTag ¶
SplitImageStreamTag turns the name of an ImageStreamTag into Name and Tag. It returns false if the tag was not properly specified in the name.
func StatusHasTag ¶
func StatusHasTag(stream *imagev1.ImageStream, name string) (imagev1.NamedTagEventList, bool)
StatusHasTag returns named tag from image stream's status and boolean whether one was found.
Types ¶
This section is empty.