1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use async_trait::async_trait;
use mithril_common::StdResult;
use std::path::Path;

#[cfg(test)]
use mockall::automock;

pub type SnapshotLocation = String;

/// SnapshotUploader represents a snapshot uploader interactor
#[cfg_attr(test, automock)]
#[async_trait]
pub trait SnapshotUploader: Sync + Send {
    /// Upload a snapshot
    async fn upload_snapshot(&self, snapshot_filepath: &Path) -> StdResult<SnapshotLocation>;
}