( dataSources: Record<string, DataSource>, account: string, container: string )
| 2 | import { DataSource } from '@/api/Models'; |
| 3 | |
| 4 | export function getDataSourceFromDatasources( |
| 5 | dataSources: Record<string, DataSource>, |
| 6 | account: string, |
| 7 | container: string |
| 8 | ): DataSource { |
| 9 | if (!dataSources) { |
| 10 | throw new Error('No data sources found'); |
| 11 | } |
| 12 | const dataSourceKey = `${account}/${container}`; |
| 13 | const dataSource = dataSources[dataSourceKey]; |
| 14 | if (!dataSource) { |
| 15 | return undefined; |
| 16 | } |
| 17 | return dataSource; |
| 18 | } |
| 19 | |
| 20 | export function getContainerClient( |
| 21 | dataSources: Record<string, DataSource>, |
no outgoing calls
no test coverage detected