mirror of
https://github.com/chubin/wttr.in
synced 2025-01-26 02:34:59 +00:00
Add Nominatim configuration
This commit is contained in:
parent
2ce4c28c34
commit
caecca05cf
1 changed files with 17 additions and 0 deletions
|
@ -78,6 +78,16 @@ type Geo struct {
|
|||
IPCacheDB string `yaml:"ipCacheDB,omitempty"`
|
||||
|
||||
CacheType types.CacheType `yaml:"cacheType,omitempty"`
|
||||
|
||||
Nominatim []Nominatim
|
||||
}
|
||||
|
||||
type Nominatim struct {
|
||||
Name string
|
||||
|
||||
URL string
|
||||
|
||||
Token string
|
||||
}
|
||||
|
||||
// Default contains the default configuration.
|
||||
|
@ -90,6 +100,13 @@ func Default() *Config {
|
|||
IPCache: "/wttr.in/cache/ip2l",
|
||||
IPCacheDB: "/wttr.in/cache/geoip.db",
|
||||
CacheType: types.CacheTypeDB,
|
||||
Nominatim: []Nominatim{
|
||||
{
|
||||
Name: "locationiq",
|
||||
URL: "https://eu1.locationiq.com/v1/search",
|
||||
Token: os.Getenv("NOMINATIM_LOCATIONIQ"),
|
||||
},
|
||||
},
|
||||
},
|
||||
Logging{
|
||||
AccessLog: "/wttr.in/log/access.log",
|
||||
|
|
Loading…
Reference in a new issue