Documentation ¶
Index ¶
- Constants
- func Delete(inputLabels map[string]string, keys ...string)
- func DeleteWithPrefix(inputLabels map[string]string, prefix string)
- func FilterByPrefix(prefix string, inputLabels map[string]string) (labels map[string]string)
- func MergeLabels(destination, additions map[string]string, modifier StringModifier)
- func MergeLabelsPrefix(destination, additions map[string]string, prefix string)
- func RemovePrefix(prefix string, inputLabels map[string]string) (labels map[string]string)
- type Label
- type StringModifier
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 DeleteWithPrefix ¶
Delete all keys that have the passed in prefix.
func FilterByPrefix ¶
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 ¶
Adds all of the keys/values in additions to destination Each key in addition will be modified by having prefix prepended to it.
Types ¶
type StringModifier ¶
Function that modifies an input string
Click to show internal directories.
Click to hide internal directories.