github.com/gemaraproj/gemara@v0.23.0

collections.cue raw

 1// Schema lifecycle: experimental | stable | deprecated
 2@status("stable")
 3package gemara
 4
 5@go(gemara)
 6
 7// Catalog describes a set of topically-associated entries
 8#Catalog: {
 9	// title describes the purpose of this catalog at a glance
10	title: string
11
12	// metadata provides detailed data about this catalog
13	metadata: #Metadata @go(Metadata)
14
15	// groups contains a list of groups that can be referenced by entries in this catalog
16	groups?: [#Group, ...#Group]
17
18	// extends references catalogs that this catalog builds upon
19	extends?: [...#ArtifactMapping] @go(Extends)
20
21	imports?: [#MultiEntryMapping, ...#MultiEntryMapping]
22
23	if groups != _|_ {
24		_uniqueGroupIds: {for i, g in groups {(g.id): i}}
25	}
26
27	if extends != _|_ {
28		metadata: "mapping-references": [#MappingReference, ...#MappingReference]
29	}
30
31	if imports != _|_ {
32		metadata: "mapping-references": [#MappingReference, ...#MappingReference]
33	}
34}
35
36// Lifecycle represents the lifecycle state of a guideline, control, or assessment requirement
37#Lifecycle: *"Active" | "Draft" | "Deprecated" | "Retired" @go(-)
38
39// Log describes a set of recorded entries from a measurement activity
40#Log: {
41	// metadata provides detailed data about this log
42	metadata: #Metadata @go(Metadata)
43
44	// target identifies the resource being evaluated
45	target: #Resource @go(Target)
46}