feat: Support config files with viper (#4696)

This commit is contained in:
Kyle Carberry
2022-10-21 17:08:23 -05:00
committed by GitHub
parent adc5c1a131
commit 7bc5b89f7a
36 changed files with 1099 additions and 1093 deletions
+8
View File
@@ -6,6 +6,10 @@ import (
"path/filepath"
)
const (
FlagName = "global-config"
)
// Root represents the configuration directory.
type Root string
@@ -42,6 +46,10 @@ func (r Root) PostgresPort() File {
return File(filepath.Join(r.PostgresPath(), "port"))
}
func (r Root) DeploymentConfigPath() string {
return filepath.Join(string(r), "server.yaml")
}
// File provides convenience methods for interacting with *os.File.
type File string