36 lines
916 B
Go
36 lines
916 B
Go
package main
|
|
|
|
// Station 站点信息
|
|
type Station struct {
|
|
StationID string `json:"station_id"`
|
|
StationName string `json:"station_name"`
|
|
DeviceType string `json:"device_type"`
|
|
LastUpdate string `json:"last_update"`
|
|
}
|
|
|
|
// WeatherPoint 气象数据点
|
|
type WeatherPoint struct {
|
|
DateTime string `json:"date_time"`
|
|
Temperature float64 `json:"temperature"`
|
|
Humidity float64 `json:"humidity"`
|
|
Pressure float64 `json:"pressure"`
|
|
WindSpeed float64 `json:"wind_speed"`
|
|
WindDir float64 `json:"wind_direction"`
|
|
Rainfall float64 `json:"rainfall"`
|
|
Light float64 `json:"light"`
|
|
UV float64 `json:"uv"`
|
|
}
|
|
|
|
// PageData 页面数据结构
|
|
type PageData struct {
|
|
Title string
|
|
ServerTime string
|
|
OnlineDevices int
|
|
}
|
|
|
|
// SystemStatus 系统状态结构
|
|
type SystemStatus struct {
|
|
OnlineDevices int `json:"online_devices"`
|
|
ServerTime string `json:"server_time"`
|
|
}
|