You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
732 B
Go
31 lines
732 B
Go
package main
|
|
|
|
type Type int
|
|
type Request_Type int
|
|
type Response_Type int
|
|
|
|
type Data struct {
|
|
Type *Type `json:"TYPE",omitempty` // TYPE
|
|
Request *Request_Type `json:"REQUEST,omitempty"` // REQUEST TYPE
|
|
Response *Response_Type `json:"RESPONSE,omitempty"` // RESPONSE TYPE
|
|
Hostname *string `json:"HOSTNAME,omitempty"` // HOSTNAME
|
|
Data *map[string]any `json:"DATA,omitempty"` // DATA
|
|
}
|
|
|
|
const ( // TYPE
|
|
REQUEST Type = 1
|
|
RESPONSE Type = 2
|
|
)
|
|
|
|
const ( // REQUEST TYPES
|
|
NEW_SERVER_CLIENT Request_Type = 1
|
|
NEW_DESKTOP_CLIENT Request_Type = 2
|
|
DATA Request_Type = 3
|
|
)
|
|
|
|
const ( // RESPONSE TYPES
|
|
OK Response_Type = 1
|
|
CREATED Response_Type = 2
|
|
NOT_OK Response_Type = 3
|
|
)
|