forked from Elara6331/itd
		
	Switch to iota for request types and move to types package
This commit is contained in:
		| @@ -1,5 +1,20 @@ | ||||
| package types | ||||
|  | ||||
| const ( | ||||
| 	ReqTypeHeartRate = iota | ||||
| 	ReqTypeBattLevel | ||||
| 	ReqTypeFwVersion | ||||
| 	ReqTypeFwUpgrade | ||||
| 	ReqTypeBtAddress | ||||
| 	ReqTypeNotify | ||||
| 	ReqTypeSetTime | ||||
| ) | ||||
|  | ||||
| const ( | ||||
| 	UpgradeTypeArchive = iota | ||||
| 	UpgradeTypeFiles | ||||
| ) | ||||
|  | ||||
| type ReqDataFwUpgrade struct { | ||||
| 	Type  int | ||||
| 	Files []string | ||||
| @@ -12,11 +27,11 @@ type Response struct { | ||||
| } | ||||
|  | ||||
| type Request struct { | ||||
| 	Type string      `json:"type"` | ||||
| 	Type int         `json:"type"` | ||||
| 	Data interface{} `json:"data,omitempty"` | ||||
| } | ||||
|  | ||||
| type ReqDataNotify struct { | ||||
| 	Title string | ||||
| 	Body  string | ||||
| } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user