We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2f5100 commit d77260cCopy full SHA for d77260c
ent/schema/policies.go
@@ -12,6 +12,11 @@ type Policies struct {
12
ent.Schema
13
}
14
15
+type PolicyLabel struct {
16
+ Key string `json:"key"`
17
+ Value string `json:"value"`
18
+}
19
+
20
type Image struct {
21
Registry string `json:"registry"`
22
Name string `json:"name"`
@@ -37,6 +42,9 @@ func (Policies) Fields() []ent.Field {
37
42
Comment("Policy name."),
38
43
field.JSON("image", Image{}).
39
44
Comment("Stores image details like registry, tags."),
45
+ field.JSON("labels", PolicyLabels{}).
46
+ Optional().
47
+ Comment("Policies labels key:value"),
40
48
// Todo: Trigger is optional
41
49
field.JSON("trigger", map[string]interface{}{}).
50
Optional().
0 commit comments