-
Notifications
You must be signed in to change notification settings - Fork 0
/
yamlReadTypes.go
86 lines (75 loc) · 3.2 KB
/
yamlReadTypes.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
79
80
81
82
83
84
85
86
package config
type configRead struct {
Version *int `yaml:"Version"`
ProjectTitle string `yaml:"ProjectTitle"`
Auth *authConfigRead `yaml:"Auth"`
MqttClients mqttClientConfigReadMap `yaml:"MqttClients"`
Devices deviceConfigReadMap `yaml:"Devices"`
Views viewConfigReadList `yaml:"Views"`
HttpServer *httpServerConfigRead `yaml:"HttpServer"`
LogConfig *bool `yaml:"LogConfig"`
LogWorkerStart *bool `yaml:"LogWorkerStart"`
LogDebug *bool `yaml:"LogDebug"`
}
type authConfigRead struct {
JwtSecret *string `yaml:"JwtSecret"`
JwtValidityPeriod string `yaml:"JwtValidityPeriod"`
HtaccessFile *string `yaml:"HtaccessFile"`
}
type mqttClientConfigRead struct {
Broker string `yaml:"Broker"`
ProtocolVersion *int `yaml:"ProtocolVersion"`
User string `yaml:"User"`
Password string `yaml:"Password"`
ClientId *string `yaml:"ClientId"`
Qos *byte `yaml:"Qos"`
KeepAlive string `yaml:"KeepAlive"`
ConnectRetryDelay string `yaml:"ConnectRetryDelay"`
ConnectTimeout string `yaml:"ConnectTimeout"`
AvailabilityTopic *string `yaml:"AvailabilityTopic"`
TelemetryInterval string `yaml:"TelemetryInterval"`
TelemetryTopic *string `yaml:"TelemetryTopic"`
TelemetryRetain *bool `yaml:"TelemetryRetain"`
RealtimeEnable *bool `yaml:"RealtimeEnable"`
RealtimeTopic *string `yaml:"RealtimeTopic"`
RealtimeRetain *bool `yaml:"RealtimeRetain"`
TopicPrefix string `yaml:"TopicPrefix"`
LogDebug *bool `yaml:"LogDebug"`
LogMessages *bool `yaml:"LogMessages"`
}
type mqttClientConfigReadMap map[string]mqttClientConfigRead
type deviceConfigRead struct {
Kind string `yaml:"Kind"`
Device string `yaml:"Device"`
SkipFields []string `yaml:"SkipFields"`
SkipCategories []string `yaml:"SkipCategories"`
LogDebug *bool `yaml:"LogDebug"`
LogComDebug *bool `yaml:"LogComDebug"`
}
type deviceConfigReadMap map[string]deviceConfigRead
type viewDeviceConfigRead struct {
Name string `yaml:"Name"`
Title string `yaml:"Title"`
}
type viewDeviceConfigReadList []viewDeviceConfigRead
type viewConfigRead struct {
Name string `yaml:"Name"`
Title string `yaml:"Title"`
Devices viewDeviceConfigReadList `yaml:"Devices"`
Autoplay *bool `yaml:"Autoplay"`
AllowedUsers []string `yaml:"AllowedUsers"`
Hidden *bool `yaml:"Hidden"`
SkipFields []string `yaml:"SkipFields"`
SkipCategories []string `yaml:"SkipCategories"`
}
type viewConfigReadList []viewConfigRead
type httpServerConfigRead struct {
Bind string `yaml:"Bind"`
Port *int `yaml:"Port"`
LogRequests *bool `yaml:"LogRequests"`
EnableDocs *bool `yaml:"EnableDocs"`
FrontendProxy string `yaml:"FrontendProxy"`
FrontendPath string `yaml:"FrontendPath"`
FrontendExpires string `yaml:"FrontendExpires"`
ConfigExpires string `yaml:"ConfigExpires"`
}