Structs added+updated

This commit is contained in:
Jesse Malotaux 2025-04-11 13:54:46 +02:00
parent 6767f77fcf
commit 434f917fb2
2 changed files with 32 additions and 0 deletions

View file

@ -22,6 +22,7 @@ var Endpoints = Allowed{
"/device/handshake",
"/panel/get",
"/panel/list",
"/panel/save/json",
},
Remote: []string{
"/macro/list",
@ -31,9 +32,12 @@ var Endpoints = Allowed{
"/device/link/end",
"/device/handshake",
"/device/auth",
"/panel/list",
// "/panel/get",
},
Auth: []string{
"/macro/play",
"/device/link/remove",
"/panel/get",
},
}

View file

@ -7,10 +7,38 @@ type PanelJSON struct {
Macros map[string]string `json:"macros"`
}
type PanelSaveJSON struct {
// Name string `json:"name"`
// Description string `json:"description"`
// AspectRatio string `json:"aspectRatio"`
// Macros map[string]string `json:"macros"`
Dir string `json:"dir"`
Name string `json:"name"`
Description string `json:"description"`
AspectRatio string `json:"aspectRatio"`
Macros interface{} `json:"macros"`
}
type PanelInfo struct {
Dir string `json:"dir"`
Name string `json:"name"`
Description string `json:"description"`
AspectRatio string `json:"aspectRatio"`
Macros map[string]string `json:"macros"`
Thumb string `json:"thumb"`
}
type PanelRequest struct {
Dir string `json:"dir"`
}
type PanelResponse struct {
Dir string `json:"dir"`
Name string `json:"name"`
Description string `json:"description"`
AspectRatio string `json:"aspectRatio"`
Macros map[string]string `json:"macros"`
Thumb string `json:"thumb"`
HTML string `json:"html"`
Style string `json:"style"`
}