major refactor of main.go
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
Reference in New Issue
Block a user