refactor: simplified and used sqlite for all the whitelists
This commit is contained in:
@@ -8,10 +8,8 @@ import (
|
||||
type Config struct {
|
||||
Port string
|
||||
APIToken string
|
||||
PermanentWhitelistFile string
|
||||
DataDir string
|
||||
CleanupInterval time.Duration
|
||||
WatchInterval time.Duration
|
||||
DBPath string
|
||||
}
|
||||
|
||||
@@ -19,11 +17,9 @@ func loadConfig() Config {
|
||||
return Config{
|
||||
Port: getEnv("AUTH_GATE_PORT", "8080"),
|
||||
APIToken: getEnv("AUTH_GATE_API_TOKEN", ""),
|
||||
PermanentWhitelistFile: getEnv("PERMANENT_WHITELIST_FILE", "./config/permanent_whitelist.txt"),
|
||||
DataDir: getEnv("DATA_DIR", ". /data"),
|
||||
DataDir: getEnv("DATA_DIR", "/data"),
|
||||
CleanupInterval: parseDuration("CLEANUP_INTERVAL", 60*time.Second),
|
||||
WatchInterval: parseDuration("WATCH_INTERVAL", 30*time.Second),
|
||||
DBPath: getEnv("AUTH_GATE_DB_PATH", ". /data/auth-gate.db"),
|
||||
DBPath: getEnv("AUTH_GATE_DB_PATH", "/data/auth-gate.db"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user