-
Notifications
You must be signed in to change notification settings - Fork 0
/
profile.go
30 lines (25 loc) · 1.34 KB
/
profile.go
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
package domain
// Profile is a collection of controls and metadata that can be used to create a new overlay or baseline.
// Note: The "Merge" and "Modify" are being skipped for now, as it doesn't make any sense to store the instructions for merging and modifying, rather than the result of applying them. They can be added as audit logs, holding all the details of the merge and modify operations.
type Profile struct {
Uuid Uuid `json:"uuid"`
Metadata
Imports []Import `json:"imports"`
BackMatter BackMatter `json:"backmatter"`
}
// Import Designates a referenced source catalog or profile that provides a source of control information for use in creating a new overlay or baseline.
type Import struct {
// Href is the URI of the source catalog or profile. Should be in the format `catalog/{catalog_uuid}` or `profile/{profile_uuid}`.
Href string `json:"href"`
IncludeAll bool `json:"include_all"`
IncludeControls []Selection `json:"include_controls"`
ExcludeControls []Selection `json:"exclude_controls"`
}
// ProfileSelection Selects a control or controls from an imported control set (Profile | Catalog).
type ProfileSelection struct {
WithChildControls bool `json:"with_child_controls"`
WithIds []Uuid `json:"with_ids"`
Matching []struct {
Pattern string `json:"pattern"`
} `json:"matching"`
}