Documentation ¶
Index ¶
- Constants
- Variables
- func DockerImageReferenceExact(r imagev1.DockerImageReference) string
- func DockerImageReferenceNameString(r imagev1.DockerImageReference) string
- func DockerImageReferenceString(r imagev1.DockerImageReference) string
- func FollowTagReference(stream *imagev1.ImageStream, tag string) (string, *imagev1.TagReference, bool, error)
- func HasAnnotationTag(tagRef *imagev1.TagReference, searchTag string) bool
- func ShortDockerImageID(image *dockerv10.DockerImage, length int) string
- func SortStatusTags(tags []imagev1.NamedTagEventList) []string
Constants ¶
const ( // DockerDefaultNamespace is the value for namespace when a single segment name is provided. DockerDefaultNamespace = "library" // TagReferenceAnnotationTagHidden indicates that a given TagReference is hidden from search results TagReferenceAnnotationTagHidden = "hidden" )
Variables ¶
var ( // ErrImageStreamImportUnsupported is an error client receive when the import // failed. ErrImageStreamImportUnsupported = errors.New("the server does not support directly importing images - create an image stream with tags or the dockerImageRepository field set") // ErrCircularReference is an error when reference tag is circular. ErrCircularReference = errors.New("reference tag is circular") // ErrNotFoundReference is an error when reference tag is not found. ErrNotFoundReference = errors.New("reference tag is not found") // ErrCrossImageStreamReference is an error when reference tag points to another imagestream. ErrCrossImageStreamReference = errors.New("reference tag points to another imagestream") // ErrInvalidReference is an error when reference tag is invalid. ErrInvalidReference = errors.New("reference tag is invalid") )
Functions ¶
func DockerImageReferenceExact ¶
func DockerImageReferenceExact(r imagev1.DockerImageReference) string
DockerImageReferenceExact returns a string representation of the set fields on the DockerImageReference
func DockerImageReferenceNameString ¶
func DockerImageReferenceNameString(r imagev1.DockerImageReference) string
DockerImageReferenceNameString returns the name of the reference with its tag or ID.
func DockerImageReferenceString ¶
func DockerImageReferenceString(r imagev1.DockerImageReference) string
DockerImageReferenceString converts a DockerImageReference to a Docker pull spec (which implies a default namespace according to V1 container image registry rules). Use DockerImageReferenceExact() if you want no defaulting.
func FollowTagReference ¶
func FollowTagReference(stream *imagev1.ImageStream, tag string) (string, *imagev1.TagReference, bool, error)
FollowTagReference walks through the defined tags on a stream, following any referential tags in the stream. Will return multiple if the tag had at least reference, and ref and finalTag will be the last tag seen. If an invalid reference is found, err will be returned.
func HasAnnotationTag ¶
func HasAnnotationTag(tagRef *imagev1.TagReference, searchTag string) bool
func ShortDockerImageID ¶
func ShortDockerImageID(image *dockerv10.DockerImage, length int) string
ShortDockerImageID returns a short form of the provided DockerImage ID for display
func SortStatusTags ¶
func SortStatusTags(tags []imagev1.NamedTagEventList) []string
SortStatusTags sorts the status tags of an image stream based on the latest created
Types ¶
This section is empty.