All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 5s
38 lines
598 B
Go
38 lines
598 B
Go
package config
|
|
|
|
import (
|
|
"log"
|
|
"os"
|
|
)
|
|
|
|
func GetToken() string {
|
|
return getEnvVariable("TOKEN")
|
|
}
|
|
|
|
func GetDBUSERURI() string {
|
|
return getEnvVariable("DBURIUSER")
|
|
}
|
|
|
|
func GetNatsURI() string {
|
|
return getEnvVariable("NATSURI")
|
|
}
|
|
|
|
func GetDollarServiceURL() string {
|
|
return getEnvVariable("DOLLAR_SERVICE_URL")
|
|
}
|
|
|
|
func GetUserServiceURL() string {
|
|
return getEnvVariable("TGBUSER_SERVICE_URL")
|
|
}
|
|
|
|
func GetEnvironment() string {
|
|
return getEnvVariable("ENV")
|
|
}
|
|
|
|
func getEnvVariable(key string) string {
|
|
if os.Getenv(key) == "" {
|
|
log.Fatal("error getting key", key)
|
|
}
|
|
return os.Getenv(key)
|
|
}
|