response.go 809 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. package main
  2. import "github.com/gogf/gf/encoding/gjson"
  3. // Common response fields
  4. type Common struct {
  5. Code int `json:"code"`
  6. Message string `json:"message"`
  7. Result interface{} `json:"result"`
  8. }
  9. type DeviceInfoData struct {
  10. Identifier string `json:"identifier"`
  11. Name string `json:"name"`
  12. Description string `json:"description"`
  13. Version string `json:"version"`
  14. }
  15. type DeviceInfoResponse struct {
  16. Common
  17. Data DeviceInfoData `json:"data"`
  18. }
  19. type DeviceStatusData map[string]interface{}
  20. type DeviceStatusResponse struct {
  21. Common
  22. Data DeviceStatusData `json:"data"`
  23. }
  24. type AppAuthDataResponse struct {
  25. AccessToken string `json:"access_token"`
  26. ExpireAt int64 `json:"expire_at"`
  27. }
  28. type DeviceStatusFieldResponse struct {
  29. Common
  30. Data gjson.Json `json:"data"`
  31. }