2024-04-12 07:54:27 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2024-04-12 08:00:53 +00:00
|
|
|
"errors"
|
2024-04-12 07:54:27 +00:00
|
|
|
"fmt"
|
2024-04-12 08:00:53 +00:00
|
|
|
"log"
|
|
|
|
"os"
|
|
|
|
"strconv"
|
|
|
|
|
|
|
|
"github.com/go-resty/resty/v2"
|
|
|
|
"github.com/joho/godotenv"
|
2024-04-12 07:54:27 +00:00
|
|
|
)
|
|
|
|
|
2024-04-12 08:01:24 +00:00
|
|
|
type Response struct {
|
|
|
|
success bool
|
|
|
|
}
|
|
|
|
|
|
|
|
type Endpoint string
|
|
|
|
|
|
|
|
const (
|
|
|
|
RECTANGLE Endpoint = "rectangle"
|
|
|
|
UPDATE Endpoint = "update"
|
|
|
|
COLOR Endpoint = "color"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Update struct {
|
|
|
|
endpoint Endpoint
|
|
|
|
}
|
|
|
|
|
|
|
|
type Color struct {
|
|
|
|
R int
|
|
|
|
G int
|
|
|
|
B int
|
|
|
|
endpoint Endpoint
|
|
|
|
}
|
|
|
|
|
|
|
|
type Rectangle struct {
|
|
|
|
X int
|
|
|
|
Y int
|
|
|
|
W int
|
|
|
|
H int
|
|
|
|
endpoint Endpoint
|
|
|
|
}
|
|
|
|
|
2024-04-12 07:54:27 +00:00
|
|
|
func main() {
|
|
|
|
}
|