pub struct Repository { /* private fields */ }Implementations§
Source§impl Repository
impl Repository
pub fn new( config_backend: Arc<dyn ConfigBackend>, cache_pool: DatabasePool, token_store: Arc<dyn TokenStore>, ) -> Self
pub fn cache_pool(&self) -> &DatabasePool
pub fn config_backend(&self) -> &Arc<dyn ConfigBackend> ⓘ
pub fn pool(&self) -> &SqlitePool
pub async fn add_provider(&self, config: &ProviderConfig) -> DomainResult<i64>
pub async fn get_provider(&self, id: i64) -> DomainResult<ProviderConfig>
pub async fn store_token(&self, id: i64, token: &str) -> DomainResult<()>
pub async fn list_providers(&self) -> DomainResult<Vec<ProviderConfig>>
pub async fn list_provider_ids(&self) -> DomainResult<Vec<i64>>
pub async fn update_provider( &self, id: i64, config: &ProviderConfig, ) -> DomainResult<()>
pub async fn update_provider_with_version( &self, id: i64, config: &ProviderConfig, expected_version: i64, ) -> DomainResult<bool>
pub async fn remove_provider( &self, id: i64, config_state: &ConfigState, ) -> DomainResult<()>
pub async fn update_provider_fetch_status( &self, provider_id: i64, success: bool, error: Option<String>, ) -> DomainResult<bool>
pub async fn get_provider_fetch_status( &self, provider_id: i64, ) -> DomainResult<ProviderFetchStatus>
pub async fn reset_provider_fetch_status( &self, provider_id: i64, ) -> DomainResult<()>
pub async fn clear_provider_run_history( &self, provider_id: i64, ) -> DomainResult<()>
pub async fn get_cached_pipelines( &self, provider_id: Option<i64>, ) -> DomainResult<Vec<Pipeline>>
pub async fn cache_workflow_parameters( &self, workflow_id: &str, parameters: &[WorkflowParameter], ) -> DomainResult<()>
pub async fn get_cached_workflow_parameters( &self, workflow_id: &str, ) -> DomainResult<Option<Vec<WorkflowParameter>>>
pub async fn clear_workflow_parameters_cache(&self) -> DomainResult<()>
pub async fn cache_run_history( &self, pipeline_id: &str, runs: &[PipelineRun], ) -> DomainResult<()>
pub async fn get_cached_run_history( &self, pipeline_id: &str, limit: usize, ) -> DomainResult<Vec<PipelineRun>>
pub async fn get_cached_run( &self, pipeline_id: &str, run_number: i64, ) -> DomainResult<Option<PipelineRun>>
pub async fn clear_cached_run_history( &self, pipeline_id: &str, ) -> DomainResult<()>
pub async fn clear_all_run_history_cache(&self) -> DomainResult<()>
pub async fn get_cached_runs_with_hashes( &self, pipeline_id: &str, ) -> DomainResult<HashMap<i64, (PipelineRun, String)>>
pub async fn merge_run_cache( &self, pipeline_id: &str, new_runs: Vec<PipelineRun>, changed_runs: Vec<PipelineRun>, deleted_run_numbers: Vec<i64>, ) -> DomainResult<()>
pub async fn update_pipelines_cache( &self, provider_id: i64, new_pipelines: &[Pipeline], ) -> DomainResult<()>
pub async fn get_pipelines_cache_count(&self) -> DomainResult<i64>
pub async fn get_run_history_cache_count(&self) -> DomainResult<i64>
pub async fn get_workflow_params_cache_count(&self) -> DomainResult<i64>
pub async fn clear_pipelines_cache(&self) -> DomainResult<usize>
pub async fn clear_all_caches_atomic(&self) -> DomainResult<()>
pub async fn get_table_preferences( &self, provider_id: i64, table_id: &str, ) -> DomainResult<Option<String>>
pub async fn upsert_table_preferences( &self, provider_id: i64, table_id: &str, preferences_json: &str, ) -> DomainResult<()>
pub async fn store_provider_permissions( &self, provider_id: i64, status: &PermissionStatus, ) -> DomainResult<()>
pub async fn get_provider_permissions( &self, provider_id: i64, ) -> DomainResult<Option<PermissionStatus>>
pub async fn get_cached_run_count( &self, pipeline_id: &str, ) -> DomainResult<usize>
pub async fn get_paginated_runs( &self, pipeline_id: &str, page: usize, page_size: usize, ) -> DomainResult<Vec<PipelineRun>>
Auto Trait Implementations§
impl !RefUnwindSafe for Repository
impl !UnwindSafe for Repository
impl Freeze for Repository
impl Send for Repository
impl Sync for Repository
impl Unpin for Repository
impl UnsafeUnpin for Repository
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Apply a transformation to the response body. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
High level tracing that classifies responses using gRPC headers. Read more