reference

package
v2.0.2+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2017 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func SliceHasItemsInSlice(src, dst []string) bool

SliceHasItemsInSlice is checks that any string in src slice contains in dst slice

func StringInSlice

func StringInSlice(s string, sl []string) bool

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

type ImageReference struct {
	Repository  string
	Tag         string
	RegistryURL string
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL