gitai/remote/models/
wire_operation.rs

1use serde::{Deserialize, Serialize};
2use uuid::Uuid;
3
4use super::repo_config::RepositoryConfiguration;
5
6#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct WireOperation {
8    /// The configuration defining the source
9    pub source_config: RepositoryConfiguration,
10    /// Path to the cached repository to use
11    pub cached_repo_path: String,
12    /// Unique identifier for this operation
13    pub operation_id: Uuid,
14}
15
16impl WireOperation {
17    pub fn new(source_config: RepositoryConfiguration, cached_repo_path: String) -> Self {
18        Self {
19            source_config,
20            cached_repo_path,
21            operation_id: Uuid::new_v4(),
22        }
23    }
24}