adding yemplates

This commit is contained in:
afeiszli
2021-08-19 17:00:44 -04:00
12 changed files with 343 additions and 108 deletions
+11 -2
View File
@@ -79,6 +79,15 @@ func GetVersion() string {
}
return version
}
func GetDB() string {
database := "rqlite"
if os.Getenv("DATABASE") == "sqlite" {
database = os.Getenv("DATABASE")
} else if config.Config.Server.Database == "sqlite" {
database = config.Config.Server.Database
}
return database
}
func GetAPIHost() string {
serverhost := "127.0.0.1"
remoteip, _ := GetPublicIP()
@@ -332,8 +341,8 @@ func GetSQLConn() string {
sqlconn := "http://"
if os.Getenv("SQL_CONN") != "" {
sqlconn = os.Getenv("SQL_CONN")
} else if config.Config.Server.SQLConn != "" {
} else if config.Config.Server.SQLConn != "" {
sqlconn = config.Config.Server.SQLConn
}
return sqlconn
}
}