Add cue tooling & codegen to makefile

This commit is contained in:
Denis Arh
2022-01-26 16:27:36 +01:00
parent 52209c476b
commit 1284371bb3
52 changed files with 250 additions and 563 deletions
+28
View File
@@ -0,0 +1,28 @@
package schema
import (
"strings"
)
#component: #_base & {
// copy field values from #_base
handle: handle, ident: ident, expIdent: expIdent
label: strings.ToTitle(ident)
platform: #baseHandle
resources: {
[key=_]: {"handle": key, "component": handle, "platform": platform} & #resource
}
fqrn: platform + "::" + handle
// All known RBAC operations for this component
rbac: #rbacComponent & {
operations: {
grant: {
description: "Manage \(handle) permissions"
}
}
}
}