Files
Laterna/cmd/internal/models/models.go
T
Siesta 57592b4987 feat: a lot
i did a lot of work, and i also forgot to add commits regularly. I added the controller routes to create and delete controllers, improved error handling und improved the authentification process. I'm gonna add an websocket next and then I should be hopefully done with the foundations of this project. I may also add anviewControllers route which respons with every available controller
2025-07-20 18:31:38 +02:00

40 lines
796 B
Go

package models
import (
"time"
)
type HTTPConfig struct {
AdminToken string `json:"adminToken"`
Port int `json:"port"`
Cooldown float64 `json:"cooldown"`
}
type Config struct {
HTTP HTTPConfig `json:"http"`
FileLogging bool `json:"fileLogging"`
VerboseLogging bool `json:"verboseLogging"`
}
type HTTPResponse struct {
Timestamp string `json:"timestamp"`
Status int `json:"status"`
Text string `json:"text"`
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"`
}
type LampUpdateRequest struct {
Color string `json:"color"`
}
type ControllerRequests struct {
ID int `json:"ID"`
}