3
0
corteza/server/codegen/schema/component.cue
2023-03-17 10:58:46 +01:00

33 lines
539 B
CUE

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
}
fqrt: platform + "::" + handle
envoy: {
omit: bool | *false
}
// All known RBAC operations for this component
rbac: #rbacComponent & {
operations: {
grant: {
description: "Manage \(handle) permissions"
}
}
}
}