mirror of
https://github.com/gravitl/netmaker.git
synced 2026-04-23 00:17:10 +08:00
postgres working
This commit is contained in:
@@ -30,6 +30,7 @@ var Config *EnvironmentConfig
|
||||
// EnvironmentConfig :
|
||||
type EnvironmentConfig struct {
|
||||
Server ServerConfig `yaml:"server"`
|
||||
SQL SQLConfig `yaml:"sql"`
|
||||
}
|
||||
|
||||
// ServerConfig :
|
||||
@@ -61,6 +62,17 @@ type ServerConfig struct {
|
||||
Verbosity int32 `yaml:"verbosity"`
|
||||
}
|
||||
|
||||
|
||||
// Generic SQL Config
|
||||
type SQLConfig struct {
|
||||
Host string `yaml:"host"`
|
||||
Port int32 `yaml:"port"`
|
||||
Username string `yaml:"username"`
|
||||
Password string `yaml:"password"`
|
||||
DB string `yaml:"db"`
|
||||
SSLMode string `yaml:"sslmode"`
|
||||
}
|
||||
|
||||
//reading in the env file
|
||||
func readConfig() *EnvironmentConfig {
|
||||
file := fmt.Sprintf("config/environments/%s.yaml", getEnv())
|
||||
|
||||
Reference in New Issue
Block a user