pub trait ExportDataProvider: Send + Sync {
// Required methods
fn list_export_types<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn count_export_resources<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
resource_type: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn fetch_export_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
resource_type: &'life3 str,
cursor: Option<&'life4 str>,
batch_size: u32,
) -> Pin<Box<dyn Future<Output = StorageResult<NdjsonBatch>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait;
}Expand description
Data provider for export operations.
This trait provides the data retrieval capabilities needed to perform system-level exports.
Required Methods§
Sourcefn list_export_types<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_export_types<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
) -> Pin<Box<dyn Future<Output = StorageResult<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn count_export_resources<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
resource_type: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn count_export_resources<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
resource_type: &'life3 str,
) -> Pin<Box<dyn Future<Output = StorageResult<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Sourcefn fetch_export_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
resource_type: &'life3 str,
cursor: Option<&'life4 str>,
batch_size: u32,
) -> Pin<Box<dyn Future<Output = StorageResult<NdjsonBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn fetch_export_batch<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
tenant: &'life1 TenantContext,
request: &'life2 ExportRequest,
resource_type: &'life3 str,
cursor: Option<&'life4 str>,
batch_size: u32,
) -> Pin<Box<dyn Future<Output = StorageResult<NdjsonBatch>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Fetches a batch of resources for export.
§Arguments
tenant- The tenant contextrequest- The export request (for filters)resource_type- The resource type to fetchcursor- Cursor from previous batch, or None for first batchbatch_size- Maximum number of resources to return
§Returns
A batch of NDJSON lines with cursor for next batch.