Add api config
This commit is contained in:
parent
26bc21af6d
commit
3abe5fc9c8
@ -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
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user