update config
This commit is contained in:
parent
96dc296a58
commit
a866a56b2d
@ -5,9 +5,4 @@ LISTEN_ADDR=
|
||||
JWKS_URL=https://auth.leaflow.cn/realms/Ecosystem/protocol/openid-connect/certs
|
||||
DEBUG=false
|
||||
|
||||
DATASCOPE_API_KEY=
|
||||
MEILISEARCH_HOST=
|
||||
MEILISEARCH_API_KEY=
|
||||
|
||||
ONEAPI_API_BASE=
|
||||
ONEAPI_API_KEY=
|
||||
HTTP_LISTEN_ADDR=127.0.0.1:8080
|
@ -26,6 +26,10 @@ type defaultConfig struct {
|
||||
GrpcListenAddr string
|
||||
}
|
||||
|
||||
HTTP struct {
|
||||
ListenAddr string
|
||||
}
|
||||
|
||||
JWKS struct {
|
||||
Url string
|
||||
}
|
||||
@ -33,20 +37,6 @@ type defaultConfig struct {
|
||||
DebugMode struct {
|
||||
Enable bool
|
||||
}
|
||||
|
||||
DataScope struct {
|
||||
ApiKey string
|
||||
}
|
||||
|
||||
MeiliSearch struct {
|
||||
Host string
|
||||
ApiKey string
|
||||
}
|
||||
|
||||
OneApi struct {
|
||||
ApiBase string
|
||||
ApiKey string
|
||||
}
|
||||
}
|
||||
|
||||
var Config = defaultConfig{}
|
||||
@ -60,14 +50,9 @@ func InitConfig() {
|
||||
Config.Redis.Addr = GetEnv("REDIS_ADDR")
|
||||
Config.Redis.Pass = GetEnv("REDIS_PASS")
|
||||
Config.GRPC.GrpcListenAddr = GetEnv("LISTEN_ADDR")
|
||||
Config.HTTP.ListenAddr = GetEnv("HTTP_LISTEN_ADDR")
|
||||
Config.JWKS.Url = GetEnv("JWKS_URL")
|
||||
Config.DebugMode.Enable = GetEnv("DEBUG", "false") == "true"
|
||||
Config.DataScope.ApiKey = GetEnv("DATASCOPE_API_KEY")
|
||||
Config.MeiliSearch.Host = GetEnv("MEILISEARCH_HOST")
|
||||
Config.MeiliSearch.ApiKey = GetEnv("MEILISEARCH_API_KEY")
|
||||
|
||||
Config.OneApi.ApiBase = GetEnv("OPENAI_API_BASE")
|
||||
Config.OneApi.ApiKey = GetEnv("OPENAI_API_KEY")
|
||||
|
||||
dsn := dsnparser.Parse(Config.DB.DSN)
|
||||
var dsn2 = ""
|
||||
|
Loading…
Reference in New Issue
Block a user