-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Notice for moving of sos-migrate crate.
- Loading branch information
Showing
4 changed files
with
75 additions
and
53 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +0,0 @@ | ||
#![deny(missing_docs)] | ||
#![forbid(unsafe_code)] | ||
#![cfg_attr(all(doc, CHANNEL_NIGHTLY), feature(doc_auto_cfg))] | ||
//! Library to export secrets unencrypted for migration | ||
//! or to import unencrypted data. | ||
//! | ||
//! Used to move between different software providers. | ||
//! | ||
//! This library is now obsolete as it has been folded in to the | ||
//! main [sos-sdk crate](https://docs.rs/sos-sdk/latest/sos_sdk/). | ||
use async_trait::async_trait; | ||
|
||
use sos_sdk::{crypto::AccessKey, vault::Vault}; | ||
|
||
mod error; | ||
|
||
pub use error::Error; | ||
|
||
/// Result type for the migration library. | ||
pub type Result<T> = std::result::Result<T, Error>; | ||
|
||
/// Trait for implementations that can convert data | ||
/// from a third-party provider. | ||
#[cfg_attr(target_arch="wasm32", async_trait(?Send))] | ||
#[cfg_attr(not(target_arch = "wasm32"), async_trait)] | ||
pub trait Convert { | ||
/// Input type for the conversion. | ||
type Input; | ||
|
||
/// Write the input secrets type to the specified vault. | ||
async fn convert( | ||
&self, | ||
source: Self::Input, | ||
vault: Vault, | ||
key: &AccessKey, | ||
) -> Result<Vault>; | ||
} | ||
|
||
pub mod export; | ||
pub mod import; | ||
|
||
mod migrate; | ||
|
||
pub use migrate::{AccountExport, AccountImport, LocalExport, LocalImport}; | ||