Add api config

This commit is contained in:
lash 2025-01-13 08:44:15 +00:00
parent 26bc21af6d
commit 3abe5fc9c8
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746

View File

@ -2,6 +2,7 @@ package config
import ( import (
viseconfig "git.grassecon.net/grassrootseconomics/visedriver/config" viseconfig "git.grassecon.net/grassrootseconomics/visedriver/config"
apiconfig "git.grassecon.net/grassrootseconomics/sarafu-api/config"
"git.grassecon.net/grassrootseconomics/visedriver/env" "git.grassecon.net/grassrootseconomics/visedriver/env"
) )
@ -20,7 +21,10 @@ func LoadConfig() error {
if err != nil { if err != nil {
return err return err
} }
err = apiconfig.LoadConfig()
if err != nil {
return err
}
JetstreamURL = env.GetEnv("NATS_JETSTREAM_URL", defaultJetstreamURL) JetstreamURL = env.GetEnv("NATS_JETSTREAM_URL", defaultJetstreamURL)
JetstreamClientName = env.GetEnv("NATS_JETSTREAM_CLIENT_NAME", defaultJetstreamClientName) JetstreamClientName = env.GetEnv("NATS_JETSTREAM_CLIENT_NAME", defaultJetstreamClientName)
return nil return nil
@ -29,3 +33,7 @@ func LoadConfig() error {
func DbConn() string { func DbConn() string {
return viseconfig.DbConn return viseconfig.DbConn
} }
func Language() string {
return viseconfig.DefaultLanguage
}