TP-55555 | cybertron ui (#13)
* TP-55555 | cybertron ui * TP-55555 clean up * TP-55555 clean up * TP-55555 | latest push
This commit is contained in:
19
configs/Elastic.go
Normal file
19
configs/Elastic.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package configs
|
||||
|
||||
type ElasticConfig struct {
|
||||
Addresses []string
|
||||
Username string
|
||||
Password string
|
||||
Index string
|
||||
APIKey string
|
||||
}
|
||||
|
||||
func NewElasticConfig() *ElasticConfig {
|
||||
return &ElasticConfig{
|
||||
Addresses: getStringSlice("elastic.addresses", true),
|
||||
Username: getString("elastic.username", true),
|
||||
Password: getString("elastic.password", true),
|
||||
Index: getString("elastic.index", true),
|
||||
APIKey: getString("elastic.api_key", true),
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ http:
|
||||
|
||||
# Kafka config
|
||||
kafka:
|
||||
password: xxxa
|
||||
password: kDia1uC.GI;)Al5eQ)+Q
|
||||
username: varnitgoyal/varnitgoyal95@gmail.com/ocid1.streampool.oc1.ap-mumbai-1.amaaaaaaotdslraanepwp54txqqxkmg4l6dghrhufiezqkx2lqhndgxoq7pa
|
||||
brokers: cell-1.streaming.ap-mumbai-1.oci.oraclecloud.com:9092
|
||||
group:
|
||||
@@ -66,6 +66,14 @@ DocumentService:
|
||||
mock:
|
||||
generate_token: DOCUMENT_SERVICE_MOCK_GENERATE_TOKEN
|
||||
|
||||
elastic:
|
||||
addresses: https://localhost:9200
|
||||
username: elastic
|
||||
password: 9457611267
|
||||
index: cybertron
|
||||
api_key: U3NUSmFKRUJYaHF5bTJkOUozUU06Z1ZDTE9hZm1RUnlXeHRNY21yeGxfQQ==
|
||||
|
||||
|
||||
|
||||
aws:
|
||||
region: ap-south-1
|
||||
|
||||
@@ -20,6 +20,7 @@ type AppConfig struct {
|
||||
clientConfigs *ClientConfigs
|
||||
awsConfig *AwsConfig
|
||||
KafkaConfig *KafkaConfig
|
||||
ElasticConfig *ElasticConfig
|
||||
}
|
||||
|
||||
type MigConfig struct {
|
||||
@@ -45,6 +46,7 @@ func LoadConfig() {
|
||||
httpConfig: NewHttpConfig(),
|
||||
awsConfig: NewAWSConfig(),
|
||||
KafkaConfig: NewKafkaConfig(),
|
||||
ElasticConfig: NewElasticConfig(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,3 +108,7 @@ func GetHttpConfig() *HttpConfig {
|
||||
func GetKafkaConfig() *KafkaConfig {
|
||||
return appConfig.KafkaConfig
|
||||
}
|
||||
|
||||
func GetElasticConfig() *ElasticConfig {
|
||||
return appConfig.ElasticConfig
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user