PipelineRepository

Trait PipelineRepository 

Source
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 PipelineId and Pipeline entities
  • 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§

Source

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

Source

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

Source

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

Source

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

Source

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)

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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)

Source

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

Source

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

Implementors§