-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.go
47 lines (42 loc) · 1.45 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
package main
// Redis struct for redis primary key, contains redis configurations for redis server
type Redis struct {
Network string `required:"true"`
Address string `required:"true"`
DB int `default:"0"`
MaxRetries int `default:"20"`
Password string `env:"DBPassword"`
}
// HTTPS struct for https primary key, contains https configurations for server and client
type HTTPS struct {
Listen string `default:"0.0.0.0"`
Port string `default:"8443"`
Debug bool `default:"false"`
Pem string `required:"true"`
Key string `required:"true"`
VerifyTLS bool `default:"false"`
}
// Docker struct for docker primary key, contains docker client configurations
type Docker struct {
EndPoint string `default:"unix:///var/run/docker.sock"`
CPUShares int64 `default:"512"`
Memory int64 `default:"1073741824"`
}
// Gotty struct for gotty primary key, contains gotty configurations
type Gotty struct {
TLS bool `default:"false"`
}
// DamaConfig variable with config.yml configurations
var DamaConfig = struct {
AdminUsername string `env:"DamaUser" required:"true"`
AdminPassword string `env:"DamaPassword" required:"true"`
Images []string `required:"true"`
Expire string `default:"1200"`
DeployExpire string `default:"86400"`
UploadSize int `default:"2000000000"`
EnvSize int `default:"20"`
Gotty Gotty
Docker Docker
DB Redis
HTTPS HTTPS
}{}