Skip to content

Commit

Permalink
Notice for moving of sos-migrate crate.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpfs committed Dec 3, 2023
1 parent c5292e1 commit ad2b127
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 53 deletions.
73 changes: 70 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions tests/integration/event_log/move_folder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,15 @@ async fn integration_events_move_folder() -> Result<()> {
assert_eq!(4, events.len());
assert!(matches!(events.get((0)), Some(WriteEvent::CreateVault(_))));
assert!(matches!(
events.get((1)),
events.get(1),
Some(WriteEvent::CreateSecret(_, _))
));
assert!(matches!(
events.get((2)),
events.get(2),
Some(WriteEvent::CreateSecret(_, _))
));
assert!(matches!(
events.get((3)),
events.get(3),
Some(WriteEvent::CreateSecret(_, _))
));

Expand Down
4 changes: 2 additions & 2 deletions workspace/migrate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ futures = "0.3"

[dependencies.sos-sdk]
version = "0.7"
path = "../sdk"
#path = "../sdk"

[target.'cfg(target_os="macos")'.dependencies]
security-framework = "2.8"
Expand All @@ -42,7 +42,7 @@ tokio = { version = "1", default-features = false, features = ["rt", "macros"] }
[dev-dependencies.sos-sdk]
version = "0.7"
features = ["test-utils"]
path = "../sdk"
#path = "../sdk"

[features]
interactive-keychain-tests = []
Expand Down
45 changes: 0 additions & 45 deletions workspace/migrate/src/lib.rs
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};

0 comments on commit ad2b127

Please sign in to comment.