database setup and getcurrent

This commit is contained in:
Mitsu
2025-07-08 22:03:03 +02:00
parent 96eed5121f
commit 5281f73148
7 changed files with 119 additions and 30 deletions
+28
View File
@@ -0,0 +1,28 @@
package models
import "time"
type HTTPConfig struct {
AdminToken string `json:"adminToken"`
Port int `json:"port"`
}
type Config struct {
HTTP HTTPConfig `json:"http"`
FileLogging bool `json:"fileLogging"`
VerboseLogging bool `json:"verboseLogging"`
}
type HTTPError struct {
Timestamp string `json:"timestamp"`
Status int `json:"status"`
Error string `json:"error"`
Message string `json:"message"`
Path string `json:"path"`
}
type LampState struct {
ID int `json:"id"`
Color string `json:"color"`
UpdatedAt time.Time `json:"updated_at"`
}