Files
cybertron-log-enricher/configs/client_configs.go
Varnit Goyal f20af81520 Tp 55555/integrate document service client (#5)
* TP-55555 | document client and kafka integration

* TP-55555 | introduce service concept refactor code
2024-07-27 17:00:47 +05:30

28 lines
755 B
Go

package configs
type ClientConfigs struct {
DocumentServiceHttpClientConfigs *DocumentServiceHttpClientConfigs
}
type DocumentServiceHttpClientConfigs struct {
BaseUrl string
MockEnabled bool
}
func loadClientConfigs() *ClientConfigs {
return &ClientConfigs{
DocumentServiceHttpClientConfigs: loadDocumentServiceHttpClientConfigs(),
}
}
func loadDocumentServiceHttpClientConfigs() *DocumentServiceHttpClientConfigs {
return &DocumentServiceHttpClientConfigs{
BaseUrl: getString("DocumentService.baseurl", true),
MockEnabled: getBool("DocumentService.mock.generate_token", true),
}
}
func GetDocumentServiceHttpClientConfigs() *DocumentServiceHttpClientConfigs {
return appConfig.clientConfigs.DocumentServiceHttpClientConfigs
}