@@ -14,21 +14,22 @@ import (
14
14
15
15
// Configuration are the available config values
16
16
type Configuration struct {
17
- ListenAddr string `yaml:"ListenAddr" env:"LISTEN_ADDR"`
18
- BaseURL string `yaml:"BaseURL" env:"BASE_URL"`
19
- DataDir string `yaml:"DataDir" env:"DATA_DIR"`
20
- Backend string `yaml:"Backend" env:"BACKEND"`
21
- RedisHost string `yaml:"RedisHost" env:"REDIS_HOST"`
22
- RedisPassword string `yaml:"RedisPassword" env:"REDIS_PASSWORD"`
23
- AuthBackend string `yaml:"AuthBackend" env:"AUTH_BACKEND"`
24
- UseSSL bool `yaml:"EnableSSL" env:"USE_SSL"`
25
- EnableDebugMode bool `yaml:"EnableDebugMode" env:"ENABLE_DEBUG_MODE"`
26
- EnableColorLogs bool `yaml:"EnableColorLogs" env:"ENABLE_COLOR_LOGS"`
27
- ShortedIDLength int `yaml:"ShortedIDLength" env:"SHORTED_ID_LENGTH"`
28
- Google oAuthConf `yaml:"Google" env:"GOOGLE"`
29
- GitHub oAuthConf `yaml:"GitHub" env:"GITHUB"`
30
- Microsoft oAuthConf `yaml:"Microsoft" env:"MICROSOFT"`
31
- Proxy proxyAuthConf `yaml:"Proxy" env:"PROXY"`
17
+ ListenAddr string `yaml:"ListenAddr" env:"LISTEN_ADDR"`
18
+ BaseURL string `yaml:"BaseURL" env:"BASE_URL"`
19
+ DataDir string `yaml:"DataDir" env:"DATA_DIR"`
20
+ Backend string `yaml:"Backend" env:"BACKEND"`
21
+ RedisHost string `yaml:"RedisHost" env:"REDIS_HOST"`
22
+ RedisPassword string `yaml:"RedisPassword" env:"REDIS_PASSWORD"`
23
+ AuthBackend string `yaml:"AuthBackend" env:"AUTH_BACKEND"`
24
+ UseSSL bool `yaml:"EnableSSL" env:"USE_SSL"`
25
+ EnableDebugMode bool `yaml:"EnableDebugMode" env:"ENABLE_DEBUG_MODE"`
26
+ EnableAccessLogs bool `yaml:"EnableAccessLogs" env:"ENABLE_ACCESS_LOGS"`
27
+ EnableColorLogs bool `yaml:"EnableColorLogs" env:"ENABLE_COLOR_LOGS"`
28
+ ShortedIDLength int `yaml:"ShortedIDLength" env:"SHORTED_ID_LENGTH"`
29
+ Google oAuthConf `yaml:"Google" env:"GOOGLE"`
30
+ GitHub oAuthConf `yaml:"GitHub" env:"GITHUB"`
31
+ Microsoft oAuthConf `yaml:"Microsoft" env:"MICROSOFT"`
32
+ Proxy proxyAuthConf `yaml:"Proxy" env:"PROXY"`
32
33
}
33
34
34
35
type oAuthConf struct {
@@ -44,15 +45,16 @@ type proxyAuthConf struct {
44
45
45
46
// config contains the default values
46
47
var Config = Configuration {
47
- ListenAddr : ":8080" ,
48
- BaseURL : "http://localhost:3000" ,
49
- DataDir : "data" ,
50
- Backend : "boltdb" ,
51
- EnableDebugMode : false ,
52
- EnableColorLogs : true ,
53
- UseSSL : false ,
54
- ShortedIDLength : 4 ,
55
- AuthBackend : "oauth" ,
48
+ ListenAddr : ":8080" ,
49
+ BaseURL : "http://localhost:3000" ,
50
+ DataDir : "data" ,
51
+ Backend : "boltdb" ,
52
+ EnableDebugMode : false ,
53
+ EnableAccessLogs : true ,
54
+ EnableColorLogs : true ,
55
+ UseSSL : false ,
56
+ ShortedIDLength : 4 ,
57
+ AuthBackend : "oauth" ,
56
58
}
57
59
58
60
// ReadInConfig loads the Configuration and other needed folders for further usage
0 commit comments