Function: getDataStores()
getDataStores(
directory): (options?) =>Promise<Container[]>
Defined in: data-stores.ts:43
Returns all data stores (e.g. databases, caches, etc.) from EventCatalog.
You can optionally specify if you want to get the latest version of the data stores.
Parameters
| Parameter | Type |
|---|---|
directory | string |
Returns
Function
Parameters
| Parameter | Type |
|---|---|
options? | { latestOnly: boolean; } |
options.latestOnly? | boolean |
Returns
Promise<Container[]>
Examples
import utils from '@eventcatalog/utils';
const { getDataStores } = utils('/path/to/eventcatalog');
// Gets all data stores (and versions) from the catalog
const containers = await getDataStores();
// Gets all data stores (only latest version) from the catalog
const containers = await getDataStores({ latestOnly: true });
import utils from '@eventcatalog/utils';
const { getContainers } = utils('/path/to/eventcatalog');
// Gets all containers (and versions) from the catalog
const containers = await getContainers();
// Gets all entities (only latest version) from the catalog
const containers = await getContainers({ latestOnly: true });