mirror of
https://github.com/kaaninchen/Laterna.git
synced 2026-09-17 19:12:48 +00:00
50 lines
1000 B
Go
50 lines
1000 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 {
|
|
Status int `json:"status"`
|
|
Success bool `json:"success"`
|
|
Error string `json:"error,omitempty"`
|
|
Timestamp string `json:"timestamp"`
|
|
Data any `json:"data,omitempty"`
|
|
}
|
|
|
|
type LampState struct {
|
|
ID int `json:"id"`
|
|
Color string `json:"color"`
|
|
Active bool `json:"active"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|
|
|
|
type LampUpdateRequest struct {
|
|
Color string `json:"color"`
|
|
}
|
|
|
|
type ControllerRequests struct {
|
|
ID int `json:"ID"`
|
|
}
|
|
|
|
type DeleteData struct {
|
|
Deleted int `json:"deleted"`
|
|
}
|
|
|
|
type ToggleController struct {
|
|
ID int `json:"id"`
|
|
Active bool `json:"active"`
|
|
}
|