Matrix/types.go

33 lines
625 B
Go
Raw Normal View History

2024-04-12 12:13:21 +00:00
package main
type Response struct {
Success bool `json:"success"`
}
type Endpoint string
const (
RECTANGLE Endpoint = "rectangle"
UPDATE Endpoint = "update"
COLOR Endpoint = "color"
)
type Update struct {
Endpoint Endpoint `json:"endpoint"`
}
type Color struct {
R uint8 `json:"r"`
G uint8 `json:"g"`
B uint8 `json:"b"`
Endpoint Endpoint `json:"endpoint"`
}
type Rectangle struct {
X int `json:"x"`
Y int `json:"y"`
W uint `json:"w"`
H uint `json:"h"`
Endpoint Endpoint `json:"endpoint"`
}