package mill import "time" const accountEndpoint = "https://eurouter.ablecloud.cn:9005/zc-account/v1/" const serviceEndpoint = "https://eurouter.ablecloud.cn:9005/millService/v1/" type millHome struct { HomeID int64 `json:"homeId"` HomeName string `json:"homeName"` } type millDevice struct { DeviceID int `json:"deviceId"` DeviceName string `json:"deviceName"` PowerStatus int `json:"powerStatus"` HolidayTemp int `json:"holidayTemp"` CurrentTemp float64 `json:"currentTemp"` SubDomainID int `json:"subDomainId"` } type authReqBody struct { Account string `json:"account"` Password string `json:"password"` } type authResBody struct { Token string `json:"token"` UserID int `json:"userId"` NickName string `json:"nickName"` TokenExpire string `json:"tokenExpire"` } type listHomeReqBody struct{} type listHomeResBody struct { HomeList []millHome `json:"homeList"` } type listDeviceReqBody struct { HomeID int64 `json:"homeId"` } type listDeviceResBody struct { DeviceInfo []millDevice `json:"deviceInfo"` } type changeInfoReqBody struct { HomeType int `json:"homeType"` DeviceID int `json:"deviceId"` Value int `json:"value"` TimeZoneNum string `json:"timeZoneNum"` Key string `json:"key"` } type deviceControlReqBody struct { SubDomain string `json:"subDomain"` DeviceID int `json:"deviceId"` TestStatus int `json:"testStatus"` Operation int `json:"operation"` Status int `json:"status"` WindStatus int `json:"windStatus"` TempType int `json:"tempType"` PowerLevel int `json:"powerLevel"` } var location *time.Location func init() { myLocation, err := time.LoadLocation("Europe/Oslo") if err != nil { panic(err.Error()) } location = myLocation }