Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrReferenceInvalidFormat is thrown when unable to parse image reference ErrReferenceInvalidFormat = errors.New("Invalid repository format") )
Functions ¶
func RemoveDuplicates ¶
func RemoveDuplicates(xs *[]string)
RemoveDuplicates removes duplicated strings in slice (in-place)
func SliceHasItemsInSlice ¶
SliceHasItemsInSlice is checks that any string in src slice contains in dst slice
func StringInSlice ¶
StringInSlice checks is given string present in slice of strings
Types ¶
type GarbageDetectInfo ¶
type GarbageDetectInfo struct {
Items []*GarbageDetectItem
}
GarbageDetectInfo holds whole list of GarbageDetectItem
func DetectGarbage ¶
func DetectGarbage(k8sImageList []string, api registryInterface, ignoreMissing bool) (*GarbageDetectInfo, error)
DetectGarbage will detect garbage for a given set of deployed image references
type GarbageDetectItem ¶
type GarbageDetectItem struct {
Repository string
DeployedTagList []string
GarbageDigestList []string
GarbageTagList []string
}
GarbageDetectItem holds information about repository, deployed tags and garbage digests
type ImageReference ¶
ImageReference is parsed image reference specification
func DecodeReference ¶
func DecodeReference(reference string) (*ImageReference, error)
DecodeReference will try to parse image reference and return following structure:
for given input: registry.example.com:80/sample/repository:42
it will will ImageReference as follow: Repository: sample/repository Tag: 42 RegistryURL: registry.example.com:80
more examples in tests