summaryrefslogtreecommitdiff
path: root/internal/consts/consts.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@klarrio.com>2021-03-04 12:08:17 +0100
committerLibravatar tsmethurst <tobi.smethurst@klarrio.com>2021-03-04 12:08:17 +0100
commitbaa2cbcca311ac783b43c94916641bdc391305a8 (patch)
tree1d49c190e93910cbdba9d26341dd62c4d73f21d2 /internal/consts/consts.go
parentMove some consts around (diff)
parentfurther fun (diff)
downloadgotosocial-baa2cbcca311ac783b43c94916641bdc391305a8.tar.xz
Merge branch 'main' of github.com:gotosocial/server into main
Diffstat (limited to 'internal/consts/consts.go')
-rw-r--r--internal/consts/consts.go30
1 files changed, 10 insertions, 20 deletions
diff --git a/internal/consts/consts.go b/internal/consts/consts.go
index 3940c660f..34f810727 100644
--- a/internal/consts/consts.go
+++ b/internal/consts/consts.go
@@ -22,11 +22,12 @@ package consts
import "regexp"
-// FlagNames is used for storing the names of the various flags used for
+// Flags is used for storing the names of the various flags used for
// initializing and storing urfavecli flag variables.
-type FlagNames struct {
+type Flags struct {
LogLevel string
ApplicationName string
+ ConfigPath string
DbType string
DbAddress string
DbPort string
@@ -37,38 +38,27 @@ type FlagNames struct {
// GetFlagNames returns a struct containing the names of the various flags used for
// initializing and storing urfavecli flag variables.
-func GetFlagNames() FlagNames {
- return FlagNames{
+func GetFlagNames() Flags {
+ return Flags{
LogLevel: "log-level",
ApplicationName: "application-name",
+ ConfigPath: "config-path",
DbType: "db-type",
DbAddress: "db-address",
DbPort: "db-port",
- DbUser: "db-users",
+ DbUser: "db-user",
DbPassword: "db-password",
DbDatabase: "db-database",
}
}
-// EnvNames is used for storing the environment variable keys used for
-// initializing and storing urfavecli flag variables.
-type EnvNames struct {
- LogLevel string
- ApplicationName string
- DbType string
- DbAddress string
- DbPort string
- DbUser string
- DbPassword string
- DbDatabase string
-}
-
// GetEnvNames returns a struct containing the names of the environment variable keys used for
// initializing and storing urfavecli flag variables.
-func GetEnvNames() FlagNames {
- return FlagNames{
+func GetEnvNames() Flags {
+ return Flags{
LogLevel: "GTS_LOG_LEVEL",
ApplicationName: "GTS_APPLICATION_NAME",
+ ConfigPath: "GTS_CONFIG_PATH",
DbType: "GTS_DB_TYPE",
DbAddress: "GTS_DB_ADDRESS",
DbPort: "GTS_DB_PORT",