lstags: github.com/ivanilves/lstags/api/v1/collection Index | Files

package collection

import "github.com/ivanilves/lstags/api/v1/collection"

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

Index

Package Files

collection.go

type Collection Uses

type Collection struct {
    // contains filtered or unexported fields
}

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

func New Uses

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 Uses

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

Refs returns all repository references from collection

func (*Collection) Repo Uses

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

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

func (*Collection) RepoCount Uses

func (cn *Collection) RepoCount() int

RepoCount counts total repo number inside the collection

func (*Collection) Repos Uses

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

Repos returns all repository structures from collection

func (*Collection) TagCount Uses

func (cn *Collection) TagCount() int

TagCount counts total tag number inside the collection

func (*Collection) TagMap Uses

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 Uses

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

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

func (*Collection) Tags Uses

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

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

Package collection imports 3 packages (graph) and is imported by 1 packages. Updated 2018-08-22. Refresh now. Tools for package owners.