label

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OnepanelPrefix              = "onepanel.io/"
	TagPrefix                   = "tags.onepanel.io/"
	WorkflowTemplate            = OnepanelPrefix + "workflow-template"
	WorkflowTemplateUid         = OnepanelPrefix + "workflow-template-uid"
	WorkflowTemplateVersionUid  = OnepanelPrefix + "workflow-template-version-uid"
	WorkspaceTemplateVersionUid = OnepanelPrefix + "workspace-template-version-uid"
	WorkflowUid                 = OnepanelPrefix + "workflow-uid"
	CronWorkflowUid             = OnepanelPrefix + "cron-workflow-uid"
	Version                     = OnepanelPrefix + "version"
	VersionLatest               = OnepanelPrefix + "version-latest"
)

Variables

This section is empty.

Functions

func Delete

func Delete(inputLabels map[string]string, keys ...string)

Delete all of the keys in the inputLabels

func DeleteWithPrefix

func DeleteWithPrefix(inputLabels map[string]string, prefix string)

Delete all keys that have the passed in prefix.

func FilterByPrefix

func FilterByPrefix(prefix string, inputLabels map[string]string) (labels map[string]string)

Returns a map where only the keys that have the input prefix are kept.

func MergeLabels

func MergeLabels(destination, additions map[string]string, modifier StringModifier)

Adds all of the key/values in additions to destination. Each key is formatted according to the modifier function.

func MergeLabelsPrefix

func MergeLabelsPrefix(destination, additions map[string]string, prefix string)

Adds all of the keys/values in additions to destination Each key in addition will be modified by having prefix prepended to it.

func RemovePrefix

func RemovePrefix(prefix string, inputLabels map[string]string) (labels map[string]string)

Types

type Label added in v0.12.0

type Label struct {
	Key   string
	Value string
}

Label represents a Key/Value pair label

type StringModifier

type StringModifier func(string) string

Function that modifies an input string

Jump to

Keyboard shortcuts

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