feat: add cache layer over api
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user