schema improvements

This commit is contained in:
Johannes Kirschbauer
2024-06-20 18:36:26 +02:00
committed by hsjobeki
parent feace3a8e9
commit eab22fefb0
10 changed files with 244 additions and 135 deletions

View File

@@ -0,0 +1,44 @@
package schema
#groups: groups: {
// Machine groups
machines: {
// Group name mapped to list[machineName]
// "group1": ["machine1", "machine2"]
[string]: [...string]
}
}
#machine: machines: [string]: {
name: string,
description?: string,
icon?: string
}
#role: string
#service: services: [string]: [string]: {
// Required meta fields
meta: {
name: string,
icon?: string
description?: string,
},
// We moved the machine sepcific config to "machines".
// It may be moved back depending on what makes more sense in the future.
roles: [#role]: [...string],
machines: {
[string]: {
config?: {
...
}
}
},
// Configuration for the service
config: {
// Schema depends on the module.
// It declares the interface how the service can be configured.
...
}
}