ironflow_engine/operation.rs
1//! [`Operation`] trait re-exported from [`ironflow_core::operation`].
2//!
3//! The canonical definitions live in `ironflow-core` so that external crates
4//! can implement [`Operation`] without depending on `ironflow-engine`.
5//! This module re-exports them for backward compatibility.
6//!
7//! # Examples
8//!
9//! ```no_run
10//! use async_trait::async_trait;
11//! use ironflow_engine::operation::Operation;
12//! use ironflow_core::operation::OperationContext;
13//! use ironflow_core::error::OperationError;
14//! use serde_json::{Value, json};
15//!
16//! struct CreateGitlabIssue {
17//! project_id: u64,
18//! title: String,
19//! }
20//!
21//! #[async_trait]
22//! impl Operation for CreateGitlabIssue {
23//! fn kind(&self) -> &str {
24//! "gitlab"
25//! }
26//!
27//! async fn execute(&self, _ctx: &OperationContext) -> Result<Value, OperationError> {
28//! Ok(json!({"issue_id": 42, "url": "https://gitlab.com/issues/42"}))
29//! }
30//! }
31//! ```
32
33pub use ironflow_core::operation::{
34 NoopSecretResolver, Operation, OperationContext, SecretResolver, SecretValue, TypedOperation,
35};