2021-08-21 08:19:49 +00:00
|
|
|
package types
|
|
|
|
|
2021-08-25 03:32:17 +00:00
|
|
|
const (
|
|
|
|
ReqTypeHeartRate = iota
|
|
|
|
ReqTypeBattLevel
|
|
|
|
ReqTypeFwVersion
|
|
|
|
ReqTypeFwUpgrade
|
|
|
|
ReqTypeBtAddress
|
|
|
|
ReqTypeNotify
|
|
|
|
ReqTypeSetTime
|
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
UpgradeTypeArchive = iota
|
|
|
|
UpgradeTypeFiles
|
|
|
|
)
|
|
|
|
|
2021-08-21 08:19:49 +00:00
|
|
|
type ReqDataFwUpgrade struct {
|
|
|
|
Type int
|
|
|
|
Files []string
|
|
|
|
}
|
|
|
|
|
|
|
|
type Response struct {
|
|
|
|
Value interface{} `json:"value,omitempty"`
|
|
|
|
Message string `json:"msg,omitempty"`
|
|
|
|
Error bool `json:"error"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Request struct {
|
2021-08-25 03:32:17 +00:00
|
|
|
Type int `json:"type"`
|
2021-08-21 08:19:49 +00:00
|
|
|
Data interface{} `json:"data,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type ReqDataNotify struct {
|
|
|
|
Title string
|
|
|
|
Body string
|
2021-08-25 03:32:17 +00:00
|
|
|
}
|