add new lights, add login and role to it, add services page
This commit is contained in:
9
backend/models/drivers.go
Normal file
9
backend/models/drivers.go
Normal 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"`
|
||||
}
|
20
backend/models/jsonResponse.go
Normal file
20
backend/models/jsonResponse.go
Normal 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(),
|
||||
}
|
||||
}
|
@@ -1,3 +0,0 @@
|
||||
package models
|
||||
|
||||
type LightBar []Value
|
@@ -1,3 +0,0 @@
|
||||
package models
|
||||
|
||||
type MovingHead []Value
|
@@ -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"`
|
||||
}
|
||||
|
@@ -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"`
|
||||
}
|
||||
|
Reference in New Issue
Block a user