41 lines
796 B
Go
41 lines
796 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type WeatherResponse struct {
|
|
Name string `json:"name"`
|
|
Main struct {
|
|
Temp float64 `json:"temp"`
|
|
FeelsLike float64 `json:"feels_like"`
|
|
Humidity int `json:"humidity"`
|
|
}
|
|
|
|
Weather []struct {
|
|
Description string `json:"description"`
|
|
} `json:"weather"`
|
|
}
|
|
|
|
type Reading struct {
|
|
ID int `json:"id"`
|
|
City string `json:"city"`
|
|
Temp float64 `json:"temp"`
|
|
FeelsLike float64 `json:"feels_like"`
|
|
Humidity int `json:"humidity"`
|
|
Conditions string `json:"conditions"`
|
|
FetchedAt time.Time `json:"fetched_at"`
|
|
}
|
|
|
|
type HealthResponse struct {
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
type TestResponse struct {
|
|
Status string `json:"status"`
|
|
}
|
|
|
|
type LatestTemperatureResponse struct {
|
|
Temp int `json:"temp"`
|
|
}
|