* TP-55555 | document client and kafka integration * TP-55555 | introduce service concept refactor code
28 lines
755 B
Go
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
|
|
}
|