/
types.go
43 lines (37 loc) · 1.3 KB
/
types.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
package config
type Config struct {
ConfigDir string
Server ServerConfig `koanf:"server"`
Core CoreConfig `koanf:"core"`
Proxy ProxyConfig `koanf:"proxy"`
}
type CoreConfig struct {
EnableColors bool `koanf:"enableColors"`
BufferSize int `koanf:"bufferSize"`
BufferReplaySize int `koanf:"bufferReplaySize"`
CommandPrefix string `koanf:"commandPrefix"`
CommandSeparator string `koanf:"commandSeparator"`
IdleTime int `koanf:"idleTime"`
DisablePluginsOnIdle bool `koanf:"disablePluginsOnIdle"`
DisablePluginsOnIdleWhitelist []string `koanf:"disablePluginsOnIdleWhitelist"`
}
type ServerConfig struct {
Telnet *TelnetServerConfig `koanf:"telnet"`
Websocket *WebsocketServerConfig `koanf:"websocket"`
SSL *SSLServerConfig `koanf:"ssl"`
}
type SSLServerConfig struct {
Host string `koanf:"host"`
Port int `koanf:"port"`
CertFile string `koanf:"certFile"`
KeyFile string `koanf:"keyFile"`
GeneratePair bool `koanf:"generatePair"`
}
type TelnetServerConfig struct {
Host string `koanf:"host"`
Port int `koanf:"port"`
}
type WebsocketServerConfig struct {
Port int `koanf:"port"`
}
type ProxyConfig struct{}