tags

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogger

func GetLogger() *logrus.Logger

func ReformatHistory

func ReformatHistory(value string) string

ReformatHistory modifies the History tag values to their human format for the selector History tag value is: <AccountAlias>:<RoleName>,<epochtime>

func SetLogger

func SetLogger(l *logrus.Logger)

Types

type TagsList

type TagsList map[string][]string // tag key => list of values

TagsList provides the necessary struct finding all the possible tag key/values

func NewTagsList

func NewTagsList() *TagsList

func (*TagsList) Add

func (t *TagsList) Add(tag, v string)

Inserts the tag/value if it does not already exist in the sorted order

func (*TagsList) AddTags

func (t *TagsList) AddTags(tags map[string]string)

AddTags inserts a map of tag/values if they do not already exist

func (*TagsList) Get

func (t *TagsList) Get(key string) []string

Returns the list of values for the specified key

func (*TagsList) Merge

func (t *TagsList) Merge(a *TagsList)

Merge adds all the new tags in a to the TagsList

func (*TagsList) UniqueKeys

func (t *TagsList) UniqueKeys(picked []string, first string) []string

Returns a sorted unique list of tag keys, removing any keys which have already been picked if first is set, ensure that is the first element

func (*TagsList) UniqueValues

func (t *TagsList) UniqueValues(key string) []string

Returns a sorted unique list of tag values for the given key

Jump to

Keyboard shortcuts

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