-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
68 lines (57 loc) · 2.32 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//go:build !wasip1 || nofastlyhostcalls
package fastlytest
type Config struct {
Authors []string `toml:"authors,omitempty"`
Description string `toml:"description,omitempty"`
Language string `toml:"language,omitempty"`
ManifestVersion int `toml:"manifest_version,omitempty"`
Name string `toml:"name,omitempty"`
LocalServer `toml:"local_server,omitempty"`
}
type Setup struct {
}
type LocalServer struct {
Backends map[string]Backend `toml:"backends,omitempty"`
ConfigStores map[string]ConfigStore `toml:"config_stores,omitempty"`
KVStores map[string][]StoreItem `toml:"kv_stores,omitempty"`
SecretStores map[string][]StoreItem `toml:"secret_stores,omitempty"`
Geolocation `toml:"geolocation,omitempty"`
}
type Backend struct {
URL string `toml:"url,omitempty"`
}
type ConfigStore struct {
File string `toml:"file,omitempty"`
Format string `toml:"format,omitempty"`
Contents map[string]string `toml:"contents,omitempty"`
}
type StoreItem struct {
Key string `toml:"key,omitempty"`
File string `toml:"file,omitempty"`
Data string `toml:"data,omitempty"`
}
type Geolocation struct {
Format string `toml:"format,omitempty"`
File string `toml:"file,omitempty"`
Addresses map[string]GeoVariable `toml:"addresses,omitempty"`
}
type GeoVariable struct {
ASName string `toml:"as_name,omitempty"`
ASNumber int `toml:"as_number,omitempty"`
AreaCode int `toml:"area_code,omitempty"`
City string `toml:"city,omitempty"`
ConnSpeed string `toml:"conn_speed,omitempty"`
ConnType string `toml:"conn_type,omitempty"`
Continent string `toml:"continent,omitempty"`
countryCode string `toml:"country_code,omitempty"`
CountryCode3 string `toml:"country_code3,omitempty"`
CountryName string `toml:"country_name,omitempty"`
Latitude float64 `toml:"latitude,omitempty"`
Longitude float64 `toml:"longitude,omitempty"`
MetroCode int `toml:"metro_code,omitempty"`
PostalCode string `toml:"postal_code,omitempty"`
ProxyDescription string `toml:"proxy_description,omitempty"`
ProxyType string `toml:"proxy_type,omitempty"`
Region string `toml:"region,omitempty"`
UTCOffset int `toml:"utc_offset,omitempty"`
}