-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
35 lines (32 loc) · 1.13 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package main
const CONFIG_DEFAULT = "config/config.json"
type ClientConfig struct {
TimeoutSec *uint16 `json:"timeoutSec"`
Headers *map[string]string `json:"headers"`
}
type Config struct {
RequestType *string `json:"requestType"`
AreaName *string `json:"areaName"`
SensorName *string `json:"sensorName"`
GeoJsonSuffix *string `json:"geoJsonSuffix"`
AlertMin *float64 `json:"alertMin"`
AlertMax *float64 `json:"alertMax"`
MeasureUnit *string `json:"measureUnit"`
Api struct {
Scheme *string `json:"scheme"`
Server *string `json:"server"`
Base *string `json:"base"`
Area *string `json:"area"`
Hourly *string `json:"hourly"`
HttpClient *ClientConfig `json:"httpClient"`
} `json:"api"`
Ntfy struct {
// Bin *string `json:"bin"`
// Options *string `json:"options"`
// PubCmd *string `json:"pubCmd"`
Scheme *string `json:"scheme"`
Server *string `json:"server"`
Topic *string `json:"topic"`
HttpClient *ClientConfig `json:"httpClient"`
} `json:"ntfy"`
}