feat: add cache layer over api

This commit is contained in:
2026-02-08 21:26:39 +00:00
parent 3a18041c6f
commit 1eab9909e8
4 changed files with 133 additions and 1 deletions
+7
View File
@@ -1,5 +1,7 @@
package geodata
import "time"
// Country info exposed to other packages
type Country struct {
Name string
@@ -17,3 +19,8 @@ type countryApiReponse struct {
Population int64 `json:"population"`
Timezones []string `json:"timezones"` // example: [ "UTC+00:00" ]
}
type cacheCountryData struct {
FetchedAt time.Time `json:"fetched_at"`
Data TimezoneMap `json:"data"`
}