major refactor of main.go

This commit is contained in:
2026-02-18 15:35:56 -08:00
parent be7e8a3c33
commit b49349eb26
8 changed files with 366 additions and 282 deletions
+40
View File
@@ -0,0 +1,40 @@
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"`
}