pub struct GitLabAdapter { /* private fields */ }Expand description
GitLab adapter implementing the GitProvider port
Implementations§
Source§impl GitLabAdapter
impl GitLabAdapter
Sourcepub fn new(url: &str, token: &str) -> PortResult<Self>
pub fn new(url: &str, token: &str) -> PortResult<Self>
Sourcepub fn from_env() -> PortResult<Self>
pub fn from_env() -> PortResult<Self>
Create adapter from environment variables
Reads:
GITLAB_URL- GitLab instance URL (default: https://gitlab.com)GITLAB_TOKEN- GitLab API token (required)
§Errors
Returns error if required environment variables are missing
Trait Implementations§
Source§impl GitProvider for GitLabAdapter
impl GitProvider for GitLabAdapter
Source§fn get_repository<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = PortResult<Repository>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_repository<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = PortResult<Repository>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get repository information Read more
Source§fn create_ci_variable<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 str,
request: CiVariableRequest,
) -> Pin<Box<dyn Future<Output = PortResult<CiVariable>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_ci_variable<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 str,
request: CiVariableRequest,
) -> Pin<Box<dyn Future<Output = PortResult<CiVariable>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a CI/CD variable Read more
Source§fn update_ci_variable<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 str,
key: &'life2 str,
request: CiVariableRequest,
) -> Pin<Box<dyn Future<Output = PortResult<CiVariable>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_ci_variable<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 str,
key: &'life2 str,
request: CiVariableRequest,
) -> Pin<Box<dyn Future<Output = PortResult<CiVariable>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Update an existing CI/CD variable Read more
Source§fn list_ci_variables<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = PortResult<Vec<CiVariable>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_ci_variables<'life0, 'life1, 'async_trait>(
&'life0 self,
project_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = PortResult<Vec<CiVariable>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List all CI/CD variables Read more
Source§fn delete_ci_variable<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = PortResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_ci_variable<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 str,
key: &'life2 str,
) -> Pin<Box<dyn Future<Output = PortResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Delete a CI/CD variable Read more
Source§fn trigger_pipeline<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 str,
reference: &'life2 str,
) -> Pin<Box<dyn Future<Output = PortResult<PipelineRun>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn trigger_pipeline<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 str,
reference: &'life2 str,
) -> Pin<Box<dyn Future<Output = PortResult<PipelineRun>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Trigger a new pipeline/workflow run Read more
Source§fn get_pipeline<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 str,
pipeline_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = PortResult<PipelineRun>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_pipeline<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project_id: &'life1 str,
pipeline_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = PortResult<PipelineRun>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get pipeline/workflow run status Read more
Auto Trait Implementations§
impl Freeze for GitLabAdapter
impl !RefUnwindSafe for GitLabAdapter
impl Send for GitLabAdapter
impl Sync for GitLabAdapter
impl Unpin for GitLabAdapter
impl !UnwindSafe for GitLabAdapter
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
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 more