-
Notifications
You must be signed in to change notification settings - Fork 9
/
customkind.cue
70 lines (67 loc) · 1.71 KB
/
customkind.cue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package testing
import "time"
customManifest: {
appName: "custom-app"
kinds: [customKind]
}
customKind: {
kind: "CustomKind"
current: "v1-0"
versions: {
"v0-0": {
schema: {
spec: {
field1: string
deprecatedField: string
}
}
}
"v1-0": {
schema: {
#InnerObject1: {
innerField1: string
innerField2: [...string]
innerField3: [...#InnerObject2]
}
#InnerObject2: {
name: string
details: {
[string]: _
}
}
#Type1: {
group: string
options?: [...string]
}
#Type2: {
group: string
details: {
[string]: _
}
}
#UnionType: #Type1 | #Type2
spec: {
field1: string
inner: #InnerObject1
union: #UnionType
map: {
[string]: #Type2
}
timestamp: string & time.Time
enum: "val1" | "val2" | "val3" | "val4" | *"default"
i32: int32 & <= 123456
i64: int64 & >= 123456
boolField: bool | *false
floatField: float64
}
status: {
statusField1: string
}
metadata: {
customMetadataField: string
otherMetadataField: string
}
}
}
}
}