Documentation ¶
Index ¶
- func DigestOrImageMatch(image, imageID string) bool
- func DockerImageReferenceForImage(stream *imagev1.ImageStream, imageID string) (string, bool)
- func DockerImageReferenceForStream(stream *imagev1.ImageStream) (imagev1.DockerImageReference, error)
- func DockerImageReferenceNameString(r imagev1.DockerImageReference) string
- func ExactDockerImageReference(r imagev1.DockerImageReference) string
- func ImageConfigMatchesImage(image *imageapi.Image, imageConfig []byte) (bool, error)
- func ImageWithMetadata(image *imagev1.Image) error
- func InternalImageWithMetadata(image *imageapi.Image) error
- func LatestImageTagEvent(stream *imagev1.ImageStream, imageID string) (string, *imagev1.TagEvent)
- func LatestObservedTagGeneration(stream *imagev1.ImageStream, tag string) int64
- func LatestTaggedImage(stream *imagev1.ImageStream, tag string) *imagev1.TagEvent
- func ManifestMatchesImage(image *imageapi.Image, newManifest []byte) (bool, error)
- 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 ReorderImageLayers(image *imageapi.Image)
- func ResolveImageID(stream *imagev1.ImageStream, imageID string) (*imagev1.TagEvent, error)
- func ResolveLatestTaggedImage(stream *imagev1.ImageStream, tag string) (string, bool)
- func ResolveReferenceForTagEvent(stream *imagev1.ImageStream, tag string, latest *imagev1.TagEvent) string
- func ResolveTagReference(stream *imagev1.ImageStream, tag string, latest *imagev1.TagEvent) (string, bool)
- func SetDockerClientDefaults(r *imagev1.DockerImageReference)
- func SpecHasTag(stream *imagev1.ImageStream, name string) (imagev1.TagReference, bool)
- func StatusHasTag(stream *imagev1.ImageStream, name string) (imagev1.NamedTagEventList, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DigestOrImageMatch ¶
DigestOrImageMatch matches the digest in the image name.
func DockerImageReferenceForImage ¶
func DockerImageReferenceForImage(stream *imagev1.ImageStream, imageID string) (string, bool)
DockerImageReferenceForImage returns the docker reference for specified image. Assuming the image stream contains the image and the image has corresponding tag, this function will try to find this tag and take the reference policy into the account. If the image stream does not reference the image or the image does not have corresponding tag event, this function will return false.
func DockerImageReferenceForStream ¶
func DockerImageReferenceForStream(stream *imagev1.ImageStream) (imagev1.DockerImageReference, error)
DockerImageReferenceForStream returns a DockerImageReference that represents the ImageStream or false, if no valid reference exists.
func DockerImageReferenceNameString ¶
func DockerImageReferenceNameString(r imagev1.DockerImageReference) string
func ExactDockerImageReference ¶
func ExactDockerImageReference(r imagev1.DockerImageReference) string
Exact returns a string representation of the set fields on the DockerImageReference
func ImageConfigMatchesImage ¶
ImageConfigMatchesImage returns true if the provided image config matches a digest stored in the manifest of the image.
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 InternalImageWithMetadata ¶
InternalImageWithMetadata mutates the given image. It parses raw DockerImageManifest data stored in the image and fills its DockerImageMetadata and other fields.
func LatestImageTagEvent ¶
LatestImageTagEvent returns the most recent TagEvent and the tag for the specified image. Copied from v3.7 github.com/openshift/origin/pkg/image/apis/image/v1/helpers.go
func LatestObservedTagGeneration ¶
func LatestObservedTagGeneration(stream *imagev1.ImageStream, tag string) int64
LatestObservedTagGeneration returns the generation value for the given tag that has been observed by the controller monitoring the image stream. If the tag has not been observed, the generation is zero.
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 ManifestMatchesImage ¶
ManifestMatchesImage returns true if the provided manifest matches the name of the image.
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 ReorderImageLayers ¶
ReorderImageLayers mutates the given image. It reorders the layers in ascending order. Ascending order matches the order of layers in schema 2. Schema 1 has reversed (descending) order of layers.
func ResolveImageID ¶
ResolveImageID returns latest TagEvent for specified imageID and an error if there's more than one image matching the ID or when one does not exist.
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 ResolveReferenceForTagEvent ¶
func ResolveReferenceForTagEvent(stream *imagev1.ImageStream, tag string, latest *imagev1.TagEvent) string
ResolveReferenceForTagEvent applies the tag reference rules for a stream, tag, and tag event for that tag.
func ResolveTagReference ¶
func ResolveTagReference(stream *imagev1.ImageStream, tag string, latest *imagev1.TagEvent) (string, bool)
ResolveTagReference applies the tag reference rules for a stream, tag, and tag event for that tag. It returns true if the tag is
func SetDockerClientDefaults ¶
func SetDockerClientDefaults(r *imagev1.DockerImageReference)
SetDockerClientDefaults set the default values used by the Docker client.
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 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.