github.com/gemaraproj/gemara@v1.3.0

collections.cue raw

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