-
Notifications
You must be signed in to change notification settings - Fork 36
/
main.go
78 lines (74 loc) · 2.54 KB
/
main.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
69
70
71
72
73
74
75
76
77
78
package main
import (
"log"
"os"
)
func main() {
generate := Generate{
Fields: map[string]struct {
Key string
}{
"assets": {"Asset"},
"calibrations": {"Calibration"},
"channels": {"Channel"},
"classes": {"Class"},
"components": {"Component"},
"connections": {"Connection"},
"citations": {"Citation"},
"constituents": {"Constituent"},
"darts": {"Dart"},
"deployedDataloggers": {"DeployedDatalogger"},
"deployedReceivers": {"DeployedReceiver"},
"doases": {"InstalledDoas"},
"features": {"Feature"},
"firmwareHistory": {"FirmwareHistory"},
"gains": {"Gain"},
"gauges": {"Gauge"},
"installedAntennas": {"InstalledAntenna"},
"installedCameras": {"InstalledCamera"},
"installedMetSensors": {"InstalledMetSensor"},
"installedRadomes": {"InstalledRadome"},
"installedRecorders": {"InstalledRecorder"},
"installedSensors": {"InstalledSensor"},
"marks": {"Mark"},
"monuments": {"Monument"},
"mounts": {"Mount"},
"networks": {"Network"},
"placenames": {"Placename"},
"points": {"Point"},
"polarities": {"Polarity"},
"preamps": {"Preamp"},
"samples": {"Sample"},
"sessions": {"Session"},
"sites": {"Site"},
"stations": {"Station"},
"streams": {"Stream"},
"telemetries": {"Telemetry"},
"timings": {"Timing"},
"views": {"View"},
"visibilities": {"Visibility"},
},
Lookup: map[string]struct {
Key string
Fields []string
}{
"assets": {"Asset", []string{"make", "model", "serial"}},
"citations": {"Citation", []string{"key"}},
"classes": {"Class", []string{"station"}},
"darts": {"Dart", []string{"station"}},
"marks": {"Mark", []string{"code"}},
"monuments": {"Monument", []string{"mark"}},
"mounts": {"Mount", []string{"code"}},
"networks": {"Network", []string{"code"}},
"placenames": {"Placename", []string{"name"}},
"points": {"Point", []string{"sample", "location"}},
"samples": {"Sample", []string{"code"}},
"sites": {"Site", []string{"station", "location"}},
"stations": {"Station", []string{"code"}},
"views": {"View", []string{"mount", "code"}},
},
}
if err := generate.Write(os.Stdout); err != nil {
log.Fatal(err)
}
}