...
1
2
3
4 package types
5
6 type Label struct {
7
8 Pairs map[string]string `json:"pairs,omitempty" yaml:"pairs,omitempty"`
9
10
11
12
13 IncludeSelectors bool `json:"includeSelectors,omitempty" yaml:"includeSelectors,omitempty"`
14
15
16
17
18 IncludeTemplates bool `json:"includeTemplates,omitempty" yaml:"includeTemplates,omitempty"`
19 FieldSpecs []FieldSpec `json:"fields,omitempty" yaml:"fields,omitempty"`
20 }
21
22 func labelFromCommonLabels(commonLabels map[string]string) *Label {
23 if len(commonLabels) == 0 {
24 return nil
25 }
26 return &Label{
27 Pairs: commonLabels,
28 IncludeSelectors: true,
29 }
30 }
31
View as plain text