tag

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageTag

type ImageTag struct {
	TagName   string
	TagDate   *time.Time
	TagDigest string
}

ImageTag is a representation of an image tag with metadata Use NewImageTag to to initialize a new object.

func NewImageTag

func NewImageTag(tagName string, tagDate time.Time, tagDigest string) *ImageTag

NewImageTag initializes an ImageTag object and returns it

func (*ImageTag) Equals added in v0.10.2

func (tag *ImageTag) Equals(aTag *ImageTag) bool

Equals checks whether two tags are equal. Will consider any digest set for the tag with precedence, otherwise uses a tag's name.

func (*ImageTag) IsDigest added in v0.10.2

func (tag *ImageTag) IsDigest() bool

IsDigest returns true if the tag has a digest

func (*ImageTag) String

func (tag *ImageTag) String() string

String returns the tag name of the ImageTag, possibly with a digest appended to its name.

type ImageTagList

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

ImageTagList is a collection of ImageTag objects. Use NewImageTagList to to initialize a new object.

func NewImageTagList

func NewImageTagList() *ImageTagList

NewImageTagList initializes an ImageTagList object and returns it

func (ImageTagList) Add

func (il ImageTagList) Add(tag *ImageTag)

Add adds an ImageTag to an ImageTagList, ensuring this will not result in an double entry

func (ImageTagList) Contains

func (il ImageTagList) Contains(tag *ImageTag) bool

Checks whether given tag is contained in tag list in O(n) time

func (ImageTagList) SortByDate

func (il ImageTagList) SortByDate() SortableImageTagList

SortByDate returns a SortableImageTagList, sorted by the tag's date

func (ImageTagList) SortByName

func (il ImageTagList) SortByName() SortableImageTagList

SortByName returns an array of ImageTag objects, sorted by the tag's name

func (ImageTagList) SortBySemVer

func (il ImageTagList) SortBySemVer() SortableImageTagList

func (*ImageTagList) Tags

func (il *ImageTagList) Tags() []string

Tags returns a list of verbatim tag names as string slice

type SortableImageTagList

type SortableImageTagList []*ImageTag

SortableImageTagList is just that - a sortable list of ImageTag entries

func (SortableImageTagList) Len

func (il SortableImageTagList) Len() int

Len returns the length of an SortableImageList

func (SortableImageTagList) Swap

func (il SortableImageTagList) Swap(i, j int)

Swap swaps two entries in the SortableImageList

func (*SortableImageTagList) Tags

func (sil *SortableImageTagList) Tags() []string

Tags returns a list of verbatim tag names as string slice

type TagInfo added in v0.8.0

type TagInfo struct {
	CreatedAt time.Time
	Digest    [32]byte
}

TagInfo contains information for a tag

func (*TagInfo) EncodedDigest added in v0.12.0

func (ti *TagInfo) EncodedDigest() string

Jump to

Keyboard shortcuts

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