Refactor project

This commit is contained in:
Tobias Reisinger 2026-07-19 21:01:32 +02:00
commit f09bfe9db3
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
12 changed files with 77 additions and 70 deletions

View file

@ -1,19 +1,22 @@
amends "./emgauwa/controller.pkl"
module emgauwa.controller
server {
host = "127.0.0.1"
port = 4419
import "./common.pkl"
server: common.ServerConfig
database: String
permissions: common.PermissionsConfig
logging: common.LoggingConfig
midnight: String(matches(Regex(#"([01]?[0-9]|2[0-3]):[0-5][0-9]"#)))
class RelayConfig {
number: Number
driver: "null"|"gpio"|"piface"
pin: Number
inverted: Boolean
pulse: Number(this >= 0)|Null = null
}
database = "sqlite://emgauwa-controller.sqlite"
permissions {
user = "" // read("env:USER")
group = "" // read("env:USER")
}
logging {
level = "INFO"
}
midnight = "00:00"
relays: Listing<RelayConfig>