global.go 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. package amap
  2. /**
  3. * 逆地理编码结果
  4. */
  5. type RegeoResult struct {
  6. Status string `json:"status"`
  7. Info string `json:"info"`
  8. InfoCode string `json:"infocode"`
  9. RegeoCodes []*RegoCode `json:"regeocodes"`
  10. }
  11. /**
  12. * 逆地理编码地理信息,暂时只解析出地址
  13. */
  14. type RegoCode struct {
  15. FormattedAddress string `json:"formatted_address"`
  16. }
  17. /**
  18. * 坐标转换的结果
  19. */
  20. type ConvCoordResult struct {
  21. Status string `json:"status"`
  22. Info string `json:"info"`
  23. InfoCode string `json:"infocode"`
  24. Locations string `json:"locations"`
  25. }
  26. /**
  27. * 天气结果
  28. */
  29. type WeatherResult struct {
  30. Status string `json:"status"`
  31. Info string `json:"info"`
  32. InfoCode string `json:"infocode"`
  33. Lives []*Live `json:"lives"` // 实况天气
  34. Forecasts []*Forecast `json:"forecasts"` // 预报天气
  35. }
  36. type Live struct {
  37. Province string `json:"province"`
  38. City string `json:"city"`
  39. AdCode string `json:"adcode"`
  40. Weather string `json:"weather"`
  41. Termperature string `json:"temperature"`
  42. WindDirection string `json:"winddirection"`
  43. WindPower string `json:"windpower"`
  44. Humidity string `json:"humidity"`
  45. ReportTime string `json:"reporttime"`
  46. }
  47. type Forecast struct{
  48. Province string `json:"province"`
  49. City string `json:"city"`
  50. AdCode string `json:"adcode"`
  51. ReportTime string `json:"reporttime"`
  52. Casts []*Cast `json:"casts"`
  53. }
  54. type Cast struct {
  55. Date string `json:"date"`
  56. Week string `json:"week"`
  57. DayWeather string `json:"dayweather"`
  58. NightWeather string `json:"nightweather"`
  59. DayTemp string `json:"daytemp"`
  60. NightTemp string `json:"nighttemp"`
  61. DayWind string `json:"daywind"`
  62. NightWind string `json:"nightwind"`
  63. DayPower string `json:"daypower"`
  64. NightPower string `json:"nightpower"`
  65. }
  66. /**
  67. * 根据ip获取位置结果
  68. */
  69. type IpResult struct {
  70. Status string `json:"status"`
  71. Info string `json:"info"`
  72. InfoCode string `json:"infocode"`
  73. Province string `json:"province"`
  74. City string `json:"city"`
  75. AdCode string `json:"adcode"`
  76. Rectangle string `json:"rectangle"`
  77. }