Inventory: init draft ideas
This commit is contained in:
2
inventory/src/cue.mod/module.cue
Normal file
2
inventory/src/cue.mod/module.cue
Normal file
@@ -0,0 +1,2 @@
|
||||
module: "clan.lol/inventory"
|
||||
language: version: "v0.8.2"
|
||||
8
inventory/src/machines/machines.cue
Normal file
8
inventory/src/machines/machines.cue
Normal 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
28
inventory/src/root.cue
Normal 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
|
||||
}
|
||||
21
inventory/src/services/services.cue
Normal file
21
inventory/src/services/services.cue
Normal 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,
|
||||
}
|
||||
}
|
||||
9
inventory/src/users/users.cue
Normal file
9
inventory/src/users/users.cue
Normal file
@@ -0,0 +1,9 @@
|
||||
package users
|
||||
|
||||
#user: users: [string]: {
|
||||
"autoInclude": bool,
|
||||
"schemas": [ string ],
|
||||
"config": {
|
||||
...
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user