pub trait PipelineRepository: Send + Sync {
Show 14 methods
// Required methods
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
pipeline: &'life1 Pipeline,
) -> Pin<Box<dyn Future<Output = Result<(), PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: PipelineId,
) -> Pin<Box<dyn Future<Output = Result<Option<Pipeline>, PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Pipeline>, PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Pipeline>, PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Pipeline>, PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_paginated<'life0, 'async_trait>(
&'life0 self,
offset: usize,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Pipeline>, PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
pipeline: &'life1 Pipeline,
) -> Pin<Box<dyn Future<Output = Result<(), PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete<'life0, 'async_trait>(
&'life0 self,
id: PipelineId,
) -> Pin<Box<dyn Future<Output = Result<bool, PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn exists<'life0, 'async_trait>(
&'life0 self,
id: PipelineId,
) -> Pin<Box<dyn Future<Output = Result<bool, PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<usize, PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_by_config<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Pipeline>, PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn archive<'life0, 'async_trait>(
&'life0 self,
id: PipelineId,
) -> Pin<Box<dyn Future<Output = Result<bool, PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn restore<'life0, 'async_trait>(
&'life0 self,
id: PipelineId,
) -> Pin<Box<dyn Future<Output = Result<bool, PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list_archived<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Pipeline>, PipelineError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Repository interface for pipeline persistence operations
This trait defines the contract for pipeline data access operations, providing an abstraction layer between domain logic and storage technology. All methods are asynchronous to support non-blocking I/O operations.
§Design Principles
- Async-First: All operations are asynchronous for scalability
- Error Handling: Comprehensive error handling with
PipelineError - Type Safety: Strong typing with
PipelineIdandPipelineentities - Flexibility: Support for different storage implementations
§Thread Safety
Implementations must be thread-safe (Send + Sync) to support
concurrent access in multi-threaded environments.
Required Methods§
Sourcefn save<'life0, 'life1, 'async_trait>(
&'life0 self,
pipeline: &'life1 Pipeline,
) -> Pin<Box<dyn Future<Output = Result<(), PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
pipeline: &'life1 Pipeline,
) -> Pin<Box<dyn Future<Output = Result<(), PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Saves a pipeline
Sourcefn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: PipelineId,
) -> Pin<Box<dyn Future<Output = Result<Option<Pipeline>, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: PipelineId,
) -> Pin<Box<dyn Future<Output = Result<Option<Pipeline>, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Finds a pipeline by ID
Sourcefn find_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Pipeline>, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_by_name<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Pipeline>, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Finds a pipeline by name
Sourcefn list_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Pipeline>, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Pipeline>, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists all pipelines
Sourcefn find_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Pipeline>, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Pipeline>, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Finds all pipelines (alias for list_all)
Sourcefn list_paginated<'life0, 'async_trait>(
&'life0 self,
offset: usize,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Pipeline>, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_paginated<'life0, 'async_trait>(
&'life0 self,
offset: usize,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<Pipeline>, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists pipelines with pagination
Sourcefn update<'life0, 'life1, 'async_trait>(
&'life0 self,
pipeline: &'life1 Pipeline,
) -> Pin<Box<dyn Future<Output = Result<(), PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
pipeline: &'life1 Pipeline,
) -> Pin<Box<dyn Future<Output = Result<(), PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Updates a pipeline
Sourcefn delete<'life0, 'async_trait>(
&'life0 self,
id: PipelineId,
) -> Pin<Box<dyn Future<Output = Result<bool, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
id: PipelineId,
) -> Pin<Box<dyn Future<Output = Result<bool, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Deletes a pipeline by ID
Sourcefn exists<'life0, 'async_trait>(
&'life0 self,
id: PipelineId,
) -> Pin<Box<dyn Future<Output = Result<bool, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exists<'life0, 'async_trait>(
&'life0 self,
id: PipelineId,
) -> Pin<Box<dyn Future<Output = Result<bool, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Checks if a pipeline exists
Sourcefn count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<usize, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<usize, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Counts total pipelines
Sourcefn find_by_config<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Pipeline>, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn find_by_config<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
key: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Pipeline>, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Finds pipelines by configuration parameter
Sourcefn archive<'life0, 'async_trait>(
&'life0 self,
id: PipelineId,
) -> Pin<Box<dyn Future<Output = Result<bool, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn archive<'life0, 'async_trait>(
&'life0 self,
id: PipelineId,
) -> Pin<Box<dyn Future<Output = Result<bool, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Archives a pipeline (soft delete)
Sourcefn restore<'life0, 'async_trait>(
&'life0 self,
id: PipelineId,
) -> Pin<Box<dyn Future<Output = Result<bool, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn restore<'life0, 'async_trait>(
&'life0 self,
id: PipelineId,
) -> Pin<Box<dyn Future<Output = Result<bool, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Restores an archived pipeline
Sourcefn list_archived<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Pipeline>, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_archived<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Pipeline>, PipelineError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Lists archived pipelines