Inventory: init draft ideas

This commit is contained in:
Johannes Kirschbauer
2024-06-15 13:41:51 +02:00
parent bd9883baaf
commit 7474f01193
12 changed files with 309 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
module: "clan.lol/inventory"
language: version: "v0.8.2"

View File

@@ -0,0 +1,8 @@
package machines
#machine: machines: [string]: {
"name": string,
"description": string,
"icon": string,
"system": string
}

28
inventory/src/root.cue Normal file
View File

@@ -0,0 +1,28 @@
package inventory
import (
"clan.lol/inventory/services"
"clan.lol/inventory/machines"
"clan.lol/inventory/users"
)
@jsonschema(schema="http://json-schema.org/schema#")
#Root: {
meta: {
// A name of the clan (primarily shown by the UI)
name: string
// A description of the clan
description: string
// The icon path
icon: string
}
// A map of services
services.#service
// A map of machines
machines.#machine
// A map of users
users.#user
}

View File

@@ -0,0 +1,21 @@
package services
#service: services: [string]: {
autoIncludeMachines: bool,
meta: {
name: string,
},
// TODO: this should be the list of avilable modules
module: string,
machineConfig: {
[string]: {
config: {
defaultUser?: string
}
}
},
globalConfig: {
// Should be one of the avilable users
defaultUser?: string,
}
}

View File

@@ -0,0 +1,9 @@
package users
#user: users: [string]: {
"autoInclude": bool,
"schemas": [ string ],
"config": {
...
}
}