add new lights, add login and role to it, add services page

This commit is contained in:
Adrian Zuercher
2025-08-09 18:00:36 +02:00
parent 7d2ab814da
commit 1697a4dcfd
56 changed files with 1337 additions and 290 deletions

View File

@@ -0,0 +1,9 @@
package models
type Drivers struct {
Name string `json:"name"`
Description string `json:"description"`
ExecutablePath string `json:"executablePath,omitempty"`
WorkingDirectory string `json:"workingDirectory,omitempty"`
Arguments []string `json:"arguments,omitempty"`
}

View File

@@ -0,0 +1,20 @@
package models
type JsonResponse struct {
Error bool `json:"error,omitempty"`
Message string `json:"message,omitempty"`
}
func NewJsonErrorMessageResponse(msg string) JsonResponse {
return JsonResponse{
Error: true,
Message: msg,
}
}
func NewJsonErrorResponse(err error) JsonResponse {
return JsonResponse{
Error: true,
Message: err.Error(),
}
}

View File

@@ -1,3 +0,0 @@
package models
type LightBar []Value

View File

@@ -1,3 +0,0 @@
package models
type MovingHead []Value

View File

@@ -2,6 +2,7 @@ package models
type User struct {
Name string `json:"user"`
Role string `json:"role"`
Password string `json:"password,omitempty"`
Token string `json:"token,omitempty"`
}

View File

@@ -1,7 +1,9 @@
package models
type Values struct {
MovingHead *MovingHead `json:"movingHead"`
LightBar *LightBar `json:"lightBar"`
Value any `json:"value"`
Stagelights []Value `json:"stageLights,omitempty"`
LightBar []Value `json:"lightBar,omitempty"`
FloogLights []Value `json:"floodLights,omitempty"`
MovingHead []Value `json:"movingHead,omitempty"`
Value any `json:"value"`
}