Documentation ¶
Index ¶
- func HandleCleanup(c Config)
- func PrintList(list ListResponse)
- func PrintListCluster(cat Catalog)
- func PrintListRepos(cat Catalog)
- type ByTimeCreated
- type ByTimeUploaded
- type Catalog
- type CatalogResponse
- type CatalogResponseError
- type Config
- type Digest
- type FilteredList
- type ListResponse
- type Repository
- type TagsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintList ¶
func PrintList(list ListResponse)
PrintList prints the report in a pretty table output
func PrintListCluster ¶
func PrintListCluster(cat Catalog)
PrintListCluster prints the report in a pretty table output
func PrintListRepos ¶
func PrintListRepos(cat Catalog)
PrintListRepos prints the report in a pretty table output
Types ¶
type ByTimeCreated ¶
type ByTimeCreated []Digest
ByTimeCreated implements sort.Interface for []Digest based on the TimeCreatedMs field.
func (ByTimeCreated) Len ¶
func (a ByTimeCreated) Len() int
func (ByTimeCreated) Less ¶
func (a ByTimeCreated) Less(i, j int) bool
Less interprets as i "is newer than" / "happened after" j
func (ByTimeCreated) Swap ¶
func (a ByTimeCreated) Swap(i, j int)
type ByTimeUploaded ¶
type ByTimeUploaded []Digest
ByTimeUploaded implements sort.Interface for []Digest based on the TimeUploadedMs field.
func (ByTimeUploaded) Len ¶
func (a ByTimeUploaded) Len() int
func (ByTimeUploaded) Less ¶
func (a ByTimeUploaded) Less(i, j int) bool
Less interprets as i "is newer than" / "happened after" j
func (ByTimeUploaded) Swap ¶
func (a ByTimeUploaded) Swap(i, j int)
type Catalog ¶
type Catalog struct {
Repositories []Repository `json:"repositories"`
}
Catalog holds info about all image repositories
type CatalogResponse ¶
type CatalogResponse struct { Repositories []string `json:"repositories"` Errors []CatalogResponseError `json:"errors"` }
CatalogResponse is the json api response
type CatalogResponseError ¶
CatalogResponseError holds info about a possible error
type Config ¶
type Config struct { CredsFile string // path of credentials json file RepoFilter []string // list of regions we want to check KeepTags int RetentionDays int KubeconfigPath string RegistryURL string SortBy string ProtectTagRegex string DryRun bool }
Config is our application config for filtering, listing, cleaning
type Digest ¶
type Digest struct { ImageSizeBytes string `json:"imageSizeBytes"` LayerID string `json:"layerId"` MediaType string `json:"mediaType"` Tag []string `json:"tag"` TimeCreatedMs string `json:"timeCreatedMs"` TimeUploadedMs string `json:"timeUploadedMs"` Name string }
Digest holds info about image digest
type FilteredList ¶
type FilteredList struct {
TagsResponses []TagsResponse `json:"tagsResponses"`
}
FilteredList holds list of tags that were already filtered out
type ListResponse ¶
type ListResponse struct {
TagsResponses []TagsResponse `json:"tagsResponses"`
}
ListResponse is the json api response
type Repository ¶
Repository is our struct to hold parsed prefix, name, tag of image