Move the command types into a separate package

This commit is contained in:
Kovid Goyal
2022-08-17 07:13:05 +05:30
parent 45540561cc
commit 4432c1a2ea
2 changed files with 21 additions and 19 deletions

18
tools/utils/types.go Normal file
View File

@@ -0,0 +1,18 @@
package utils
type RemoteControlCmd struct {
Cmd string `json:"cmd"`
Version [3]int `json:"version"`
NoResponse bool `json:"no_response,omitifempty"`
Payload map[string]interface{} `json:"payload,omitifempty"`
Timestamp int64 `json:"timestamp,omitifempty"`
Password string `json:"password,omitifempty"`
}
type EncryptedRemoteControlCmd struct {
Version [3]int `json:"version"`
IV string `json:"iv"`
Tag string `json:"tag"`
Pubkey string `json:"pubkey"`
Encrypted string `json:"encrypted"`
}