pub struct GitLabOp<E> { /* private fields */ }Expand description
A GitLab endpoint wrapped as an Ironflow Operation.
Created via GitLab::op. Implements Operation so it
can be passed to WorkflowContext::operation() for step lifecycle tracking
(step record, status transitions, duration, output persistence).
The endpoint is executed against the cloned AsyncGitlab client and the
response is deserialized as a JSON Value.
§Examples
use ironflow_ops_gitlab::GitLab;
use ironflow_core::operation::{Operation, OperationContext, NoopSecretResolver};
use gitlab::api::projects;
use std::sync::Arc;
let ctx = OperationContext::new(Arc::new(NoopSecretResolver));
let gitlab = GitLab::from_context(&ctx).await?;
let endpoint = projects::Project::builder().project(42).build()?;
let op = gitlab.op(endpoint);
assert_eq!(op.kind(), "gitlab");Trait Implementations§
Source§impl<E> Operation for GitLabOp<E>
impl<E> Operation for GitLabOp<E>
Source§fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 OperationContext,
) -> Pin<Box<dyn Future<Output = Result<Value, OperationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn execute<'life0, 'life1, 'async_trait>(
&'life0 self,
_ctx: &'life1 OperationContext,
) -> Pin<Box<dyn Future<Output = Result<Value, OperationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute the operation and return the result as JSON. Read more
Auto Trait Implementations§
impl<E> !RefUnwindSafe for GitLabOp<E>
impl<E> !UnwindSafe for GitLabOp<E>
impl<E> Freeze for GitLabOp<E>where
E: Freeze,
impl<E> Send for GitLabOp<E>where
E: Send,
impl<E> Sync for GitLabOp<E>where
E: Sync,
impl<E> Unpin for GitLabOp<E>where
E: Unpin,
impl<E> UnsafeUnpin for GitLabOp<E>where
E: UnsafeUnpin,
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