mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-26 03:51:45 +00:00
clean up and added pixel endpoint
This commit is contained in:
parent
1138458e0a
commit
0ad98fe992
23
types.go
23
types.go
@ -9,24 +9,31 @@ type Endpoint string
|
|||||||
const (
|
const (
|
||||||
RECTANGLE Endpoint = "rectangle"
|
RECTANGLE Endpoint = "rectangle"
|
||||||
UPDATE Endpoint = "update"
|
UPDATE Endpoint = "update"
|
||||||
|
PIXEL Endpoint = "pixel"
|
||||||
COLOR Endpoint = "color"
|
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 {
|
type Update struct {
|
||||||
Endpoint Endpoint `json:"endpoint"`
|
Endpoint Endpoint `json:"endpoint"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Pixel struct {
|
||||||
|
X int `json:"x"`
|
||||||
|
Y int `json:"y"`
|
||||||
|
Endpoint Endpoint `json:"endpoint"`
|
||||||
|
}
|
||||||
|
|
||||||
type Color struct {
|
type Color struct {
|
||||||
R uint8 `json:"r"`
|
R uint8 `json:"r"`
|
||||||
G uint8 `json:"g"`
|
G uint8 `json:"g"`
|
||||||
B uint8 `json:"b"`
|
B uint8 `json:"b"`
|
||||||
Endpoint Endpoint `json:"endpoint"`
|
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"`
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user