Documentation ¶
Index ¶
- func FilterActiveImageTags(ctx context.Context, namespace string, imageName string, ...) ([]string, error)
- func FilterByRegex(imageTags *[]string, regexp *regexp.Regexp) []string
- func FilterImageTagsByTime(imageStreamObjectTags *[]imagev1.NamedTagEventList, olderThan time.Time) []string
- func FilterOrphanImageTags(gitValues, imageTags *[]string, matchOption MatchOption) []string
- func GetInactiveImageTags(activeTags, allImageTags *[]string) []string
- func GetMatchingTags(gitTags, imageTags *[]string, matchOption MatchOption) []string
- func LimitTags(tags *[]string, keep int) []string
- type MatchOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterActiveImageTags ¶
func FilterActiveImageTags(ctx context.Context, namespace string, imageName string, imageStreamTags []string, matchingTags *[]string) ([]string, error)
FilterActiveImageTags first gets all actively used image tags from imageStreamTags, then filters them out from matchingTags
func FilterByRegex ¶
FilterByRegex returns the tags that match the regexp
func FilterImageTagsByTime ¶
func FilterImageTagsByTime(imageStreamObjectTags *[]imagev1.NamedTagEventList, olderThan time.Time) []string
FilterImageTagsByTime returns the tags which are older than the specified time
func FilterOrphanImageTags ¶
func FilterOrphanImageTags(gitValues, imageTags *[]string, matchOption MatchOption) []string
FilterOrphanImageTags returns the tags that do not have any git commit match
func GetInactiveImageTags ¶
GetInactiveImageTags returns the tags without active tags (unsorted)
func GetMatchingTags ¶
func GetMatchingTags(gitTags, imageTags *[]string, matchOption MatchOption) []string
GetMatchingTags returns all image tags matching one of the provided git tags
Types ¶
type MatchOption ¶
type MatchOption string
MatchOption type defines how the tags should be matched
const ( // MatchOptionExact for exact matches MatchOptionExact MatchOption = "exact" // MatchOptionPrefix for prefix matches MatchOptionPrefix MatchOption = "prefix" )
Click to show internal directories.
Click to hide internal directories.