-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrequest_structures.go
38 lines (34 loc) · 1.34 KB
/
request_structures.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package api
import (
"encoding/json"
)
// JSONRequest struct used to parse the request content section.
type JSONRequest struct {
Header JSONRequestInfo `json:"header,omitempty"`
Content json.RawMessage `json:"content,omitempty"`
}
// JSONRequestInfo request info section fields for encrypted requests.
type JSONRequestInfo struct {
UUID string `json:"uuid,omitempty"`
DeviceType string `json:"device_type,omitempty"`
DeviceBrand string `json:"device_brand,omitempty"`
DeviceModel string `json:"device_model,omitempty"`
OS string `json:"os,omitempty"`
OSVersion string `json:"os_version,omitempty"`
Lang string `json:"lang,omitempty"`
Timezone string `json:"timezone,omitempty"`
AppVersion string `json:"app_version,omitempty"`
AppBuildVersion string `json:"app_build_version,omitempty"`
AppName string `json:"app_name,omitempty"`
SecurityToken string `json:"token,omitempty"`
DeviceId string `json:"device_id,omitempty"`
DeviceSerial string `json:"device_serial,omitempty"`
Latitude string `json:"lat,omitempty"`
Longitude string `json:"lon,omitempty"`
}
// JSONEncryptedBody struct used to parse the encrypted request and
// response body.
type JSONEncryptedBody struct {
Data string `json:"data"`
DeviceUUID string `json:"deviceUUID"`
}