Skip to main content

Plugin

Trait Plugin 

Source
pub trait Plugin: Send + Sync {
Show 40 methods // Required methods fn metadata(&self) -> &PluginMetadata; fn initialize( &mut self, provider_id: i64, config: HashMap<String, String>, http_client: Option<Arc<Client>>, ) -> PluginResult<()>; fn validate_credentials<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = PluginResult<bool>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn fetch_pipelines<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<Pipeline>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn fetch_run_history<'life0, 'life1, 'async_trait>( &'life0 self, pipeline_id: &'life1 str, limit: usize, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<PipelineRun>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn fetch_run_details<'life0, 'life1, 'async_trait>( &'life0 self, pipeline_id: &'life1 str, run_number: i64, ) -> Pin<Box<dyn Future<Output = PluginResult<PipelineRun>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn trigger_pipeline<'life0, 'async_trait>( &'life0 self, params: TriggerParams, ) -> Pin<Box<dyn Future<Output = PluginResult<TriggerResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; // Provided methods fn client_options(&self, _config: &HashMap<String, String>) -> ClientOptions { ... } fn status_source(&self) -> Option<&StatusSource> { ... } fn check_health<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<ComponentHealth>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn fetch_available_pipelines<'life0, 'async_trait>( &'life0 self, params: Option<PaginationParams>, ) -> Pin<Box<dyn Future<Output = PluginResult<PaginatedAvailablePipelines>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn fetch_organizations<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<Organization>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn fetch_pipeline_catalog<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = PluginResult<PipelineCatalog>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn ids_with_ci<'life0, 'async_trait>( &'life0 self, ids: Vec<String>, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<String>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn log_dialect(&self) -> &'static dyn LogDialect { ... } fn log_tree_version(&self) -> u32 { ... } fn fetch_log_nodes<'life0, 'life1, 'async_trait>( &'life0 self, _run: RunRef<'life1>, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<LogNode>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn read_log<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, _run: RunRef<'life1>, _node_id: &'life2 str, _from: Option<&'life3 LogCursor>, _sink: &'life4 mut LogSink, ) -> Pin<Box<dyn Future<Output = PluginResult<LogRead>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait { ... } fn fetch_available_pipelines_filtered<'life0, 'async_trait>( &'life0 self, org: Option<String>, search: Option<String>, params: Option<PaginationParams>, ) -> Pin<Box<dyn Future<Output = PluginResult<PaginatedAvailablePipelines>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn fetch_recent_runs<'life0, 'life1, 'async_trait>( &'life0 self, _pipeline_ids: &'life1 [String], _limit: usize, ) -> Pin<Box<dyn Future<Output = PluginResult<HashMap<String, Vec<PipelineRun>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn cancel_run<'life0, 'life1, 'async_trait>( &'life0 self, _pipeline_id: &'life1 str, _run_number: i64, ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn force_cancel_run<'life0, 'life1, 'async_trait>( &'life0 self, _pipeline_id: &'life1 str, _run_number: i64, ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn review_run<'life0, 'life1, 'async_trait>( &'life0 self, _pipeline_id: &'life1 str, _run_number: i64, _decision: ReviewDecision, ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn rerun_failed_jobs<'life0, 'life1, 'async_trait>( &'life0 self, _pipeline_id: &'life1 str, _run_number: i64, ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn rerun_run<'life0, 'life1, 'async_trait>( &'life0 self, _pipeline_id: &'life1 str, _run_number: i64, ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn enable_pipeline<'life0, 'life1, 'async_trait>( &'life0 self, _pipeline_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn fetch_workflow_parameters<'life0, 'life1, 'async_trait>( &'life0 self, _workflow_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<WorkflowParameter>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn fetch_rate_limit<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = PluginResult<Option<RateLimit>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_field_options<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _field_key: &'life1 str, _config: &'life2 HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<String>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn sign_in_client<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _config: &'life1 HashMap<String, String>, _http_client: &'life2 Client, ) -> Pin<Box<dyn Future<Output = PluginResult<SignInClient>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } fn sign_in_refresh_rejections(&self) -> &'static [SignInRefreshRejection] { ... } fn check_permissions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = PluginResult<PermissionStatus>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_feature_availability( &self, status: &PermissionStatus, ) -> Vec<FeatureAvailability> { ... } fn can_archive_run( &self, _pipeline_metadata: &HashMap<String, Value>, _run_metadata: &HashMap<String, Value>, _status: PipelineStatus, ) -> bool { ... } fn selection_required(&self, _config: &HashMap<String, String>) -> bool { ... } fn configured_repositories( &self, config: &HashMap<String, String>, ) -> Vec<String> { ... } fn pipeline_actions( &self, pipeline: &PipelineFacts<'_>, ) -> PipelineActionState { ... } fn run_actions( &self, _pipeline: &PipelineFacts<'_>, run: &RunFacts<'_>, ) -> RunActionState { ... } fn run_display( &self, _pipeline: &PipelineFacts<'_>, run: &RunFacts<'_>, ) -> RunDisplay { ... } fn trigger_values( &self, _pipeline: &PipelineFacts<'_>, previous: Option<&RunFacts<'_>>, parameters: &[WorkflowParameter], ) -> Map<String, Value> { ... }
}

Required Methods§

Source

fn metadata(&self) -> &PluginMetadata

Source

fn initialize( &mut self, provider_id: i64, config: HashMap<String, String>, http_client: Option<Arc<Client>>, ) -> PluginResult<()>

Source

fn validate_credentials<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = PluginResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn fetch_pipelines<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<Pipeline>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn fetch_run_history<'life0, 'life1, 'async_trait>( &'life0 self, pipeline_id: &'life1 str, limit: usize, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<PipelineRun>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn fetch_run_details<'life0, 'life1, 'async_trait>( &'life0 self, pipeline_id: &'life1 str, run_number: i64, ) -> Pin<Box<dyn Future<Output = PluginResult<PipelineRun>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn trigger_pipeline<'life0, 'async_trait>( &'life0 self, params: TriggerParams, ) -> Pin<Box<dyn Future<Output = PluginResult<TriggerResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

Source

fn client_options(&self, _config: &HashMap<String, String>) -> ClientOptions

Source

fn status_source(&self) -> Option<&StatusSource>

Source

fn check_health<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<ComponentHealth>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn fetch_available_pipelines<'life0, 'async_trait>( &'life0 self, params: Option<PaginationParams>, ) -> Pin<Box<dyn Future<Output = PluginResult<PaginatedAvailablePipelines>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn fetch_organizations<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<Organization>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn fetch_pipeline_catalog<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = PluginResult<PipelineCatalog>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn ids_with_ci<'life0, 'async_trait>( &'life0 self, ids: Vec<String>, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn log_dialect(&self) -> &'static dyn LogDialect

Source

fn log_tree_version(&self) -> u32

Source

fn fetch_log_nodes<'life0, 'life1, 'async_trait>( &'life0 self, _run: RunRef<'life1>, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<LogNode>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn read_log<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, _run: RunRef<'life1>, _node_id: &'life2 str, _from: Option<&'life3 LogCursor>, _sink: &'life4 mut LogSink, ) -> Pin<Box<dyn Future<Output = PluginResult<LogRead>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Source

fn fetch_available_pipelines_filtered<'life0, 'async_trait>( &'life0 self, org: Option<String>, search: Option<String>, params: Option<PaginationParams>, ) -> Pin<Box<dyn Future<Output = PluginResult<PaginatedAvailablePipelines>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn fetch_recent_runs<'life0, 'life1, 'async_trait>( &'life0 self, _pipeline_ids: &'life1 [String], _limit: usize, ) -> Pin<Box<dyn Future<Output = PluginResult<HashMap<String, Vec<PipelineRun>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn cancel_run<'life0, 'life1, 'async_trait>( &'life0 self, _pipeline_id: &'life1 str, _run_number: i64, ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn force_cancel_run<'life0, 'life1, 'async_trait>( &'life0 self, _pipeline_id: &'life1 str, _run_number: i64, ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn review_run<'life0, 'life1, 'async_trait>( &'life0 self, _pipeline_id: &'life1 str, _run_number: i64, _decision: ReviewDecision, ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn rerun_failed_jobs<'life0, 'life1, 'async_trait>( &'life0 self, _pipeline_id: &'life1 str, _run_number: i64, ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn rerun_run<'life0, 'life1, 'async_trait>( &'life0 self, _pipeline_id: &'life1 str, _run_number: i64, ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn enable_pipeline<'life0, 'life1, 'async_trait>( &'life0 self, _pipeline_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = PluginResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn fetch_workflow_parameters<'life0, 'life1, 'async_trait>( &'life0 self, _workflow_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<WorkflowParameter>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn fetch_rate_limit<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = PluginResult<Option<RateLimit>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_field_options<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _field_key: &'life1 str, _config: &'life2 HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = PluginResult<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn sign_in_client<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _config: &'life1 HashMap<String, String>, _http_client: &'life2 Client, ) -> Pin<Box<dyn Future<Output = PluginResult<SignInClient>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn sign_in_refresh_rejections(&self) -> &'static [SignInRefreshRejection]

Source

fn check_permissions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = PluginResult<PermissionStatus>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_feature_availability( &self, status: &PermissionStatus, ) -> Vec<FeatureAvailability>

Source

fn can_archive_run( &self, _pipeline_metadata: &HashMap<String, Value>, _run_metadata: &HashMap<String, Value>, _status: PipelineStatus, ) -> bool

Source

fn selection_required(&self, _config: &HashMap<String, String>) -> bool

Source

fn configured_repositories( &self, config: &HashMap<String, String>, ) -> Vec<String>

Source

fn pipeline_actions(&self, pipeline: &PipelineFacts<'_>) -> PipelineActionState

Source

fn run_actions( &self, _pipeline: &PipelineFacts<'_>, run: &RunFacts<'_>, ) -> RunActionState

Source

fn run_display( &self, _pipeline: &PipelineFacts<'_>, run: &RunFacts<'_>, ) -> RunDisplay

Source

fn trigger_values( &self, _pipeline: &PipelineFacts<'_>, previous: Option<&RunFacts<'_>>, parameters: &[WorkflowParameter], ) -> Map<String, Value>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§