Version: v1.2.23 Latest Latest

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

Go to latest
Published: Apr 9, 2022 License: Apache-2.0 Imports: 3 Imported by: 0



Package collection provides a "container" structure to store Docker registry query results in a well organized and easily accessible form.



This section is empty.


This section is empty.


This section is empty.


type Collection

type Collection struct {
	// contains filtered or unexported fields

Collection of API resources received from a registry or Docker daemon query

func New

func New(refs []string, tags map[string][]*tag.Tag) (*Collection, error)

New creates a collection of API resources from passed repository references and tags

func (*Collection) Refs

func (cn *Collection) Refs() []string

Refs returns all repository references from collection

func (*Collection) Repo

func (cn *Collection) Repo(ref string) *repository.Repository

Repo returns repo structure, if it is present in collection (nil if not)

func (*Collection) RepoCount

func (cn *Collection) RepoCount() int

RepoCount counts total repo number inside the collection

func (*Collection) Repos

func (cn *Collection) Repos() []*repository.Repository

Repos returns all repository structures from collection

func (*Collection) TagCount

func (cn *Collection) TagCount() int

TagCount counts total tag number inside the collection

func (*Collection) TagMap

func (cn *Collection) TagMap(ref string) map[string]*tag.Tag

TagMap returns [name]*Tag map of tag structures, if it is present in collection (nil if not)

func (*Collection) TaggedRefs

func (cn *Collection) TaggedRefs() []string

TaggedRefs returns a slice of [REGISTRY/]REPOSITORY:TAG references for all tags present in collection

func (*Collection) Tags

func (cn *Collection) Tags(ref string) []*tag.Tag

Tags returns slice of tag structures, if it is present in collection (nil if not)

Source Files

Jump to

Keyboard shortcuts

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