mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-25 11:31:46 +00:00
40 lines
782 B
Go
40 lines
782 B
Go
package main
|
|
|
|
type Response struct {
|
|
Success bool `json:"success"`
|
|
}
|
|
|
|
type Endpoint string
|
|
|
|
const (
|
|
RECTANGLE Endpoint = "rectangle"
|
|
UPDATE Endpoint = "update"
|
|
PIXEL Endpoint = "pixel"
|
|
COLOR Endpoint = "color"
|
|
)
|
|
|
|
type Rectangle struct {
|
|
X int `json:"x"`
|
|
Y int `json:"y"`
|
|
W uint `json:"w"`
|
|
H uint `json:"h"`
|
|
Endpoint Endpoint `json:"endpoint"`
|
|
}
|
|
|
|
type Update struct {
|
|
Endpoint Endpoint `json:"endpoint"`
|
|
}
|
|
|
|
type Pixel struct {
|
|
X int `json:"x"`
|
|
Y int `json:"y"`
|
|
Endpoint Endpoint `json:"endpoint"`
|
|
}
|
|
|
|
type Color struct {
|
|
R uint8 `json:"r"`
|
|
G uint8 `json:"g"`
|
|
B uint8 `json:"b"`
|
|
Endpoint Endpoint `json:"endpoint"`
|
|
}
|