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
|
||
|
|
}
|