tag

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: Apache-2.0 Imports: 5 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
}

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) *ImageTag

NewImageTag initializes an ImageTag object and returns it

func (*ImageTag) String

func (tag *ImageTag) String() string

String returns the tag name of the ImageTag

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
}

TagInfo contains information for a tag

Jump to

Keyboard shortcuts

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