first commit

This commit is contained in:
aman.singh
2024-09-12 02:59:54 +05:30
parent b00532eb04
commit dcb291f7e9
15 changed files with 544 additions and 10 deletions

View File

@@ -18,7 +18,7 @@ db:
open: 300
username: postgres
password: admin
host: localhost
host: office-server.tail3fba9.ts.net
port: 5432
name: cybertron_dev
ssl:
@@ -82,3 +82,7 @@ aws:
mjolnir:
service.url: https://qa-mjolnir-service.np.navi-ppl.in
realm.id: ZicSxsvBwE
houston:
service.url: https://qa-houston.np.navi-sa.in
realm.id: ZicSxsvBwE

View File

@@ -22,6 +22,7 @@ type AppConfig struct {
KafkaConfig *KafkaConfig
ElasticConfig *ElasticConfig
mjolnir *MjolnirClientConfig
houston *HoustonClientConfig
}
type MigConfig struct {
@@ -49,6 +50,7 @@ func LoadConfig() {
KafkaConfig: NewKafkaConfig(),
ElasticConfig: NewElasticConfig(),
mjolnir: NewMjolnirConfig(),
houston: NewHoustonConfig(),
}
}
@@ -118,3 +120,7 @@ func GetElasticConfig() *ElasticConfig {
func GetMjolnirConfig() *MjolnirClientConfig {
return appConfig.mjolnir
}
func GetHoustonConfig() *HoustonClientConfig {
return appConfig.houston
}

17
configs/houston_config.go Normal file
View File

@@ -0,0 +1,17 @@
package configs
type HoustonClientConfig struct {
baseUrl string
realmId string
}
func NewHoustonConfig() *HoustonClientConfig {
return &HoustonClientConfig{
baseUrl: getString("houston.service.url", true),
}
}
func (p *HoustonClientConfig) GetHoustonBaseUrl() string {
return p.baseUrl
}