response.go 644 B

12345678910111213141516171819202122232425262728293031
  1. package main
  2. // Common response fields
  3. type Common struct {
  4. Code int `json:"code"`
  5. Message string `json:"message"`
  6. Result interface{} `json:"result"`
  7. }
  8. type DeviceInfoData struct {
  9. Identifier string `json:"identifier"`
  10. Name string `json:"name"`
  11. Description string `json:"description"`
  12. Version string `json:"version"`
  13. }
  14. type DeviceInfoResponse struct {
  15. Common
  16. Data DeviceInfoData `json:"data"`
  17. }
  18. type DeviceStatusData map[string]interface{}
  19. type DeviceStatusResponse struct {
  20. Common
  21. Data DeviceStatusData `json:"data"`
  22. }
  23. type AppAuthDataResponse struct {
  24. AccessToken string `json:"access_token"`
  25. }