MCPcopy Create free account
hub / github.com/IQEngine/IQEngine / getDataSourceFromDatasources

Function getDataSourceFromDatasources

client/src/api/utils/AzureBlob.ts:4–18  ·  view source on GitHub ↗
(
  dataSources: Record<string, DataSource>,
  account: string,
  container: string
)

Source from the content-addressed store, hash-verified

2import { DataSource } from '@/api/Models';
3
4export 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
20export function getContainerClient(
21 dataSources: Record<string, DataSource>,

Callers 2

getMethod · 0.90
getContainerClientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected