Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust permissions to support uniffi module outside the repo #175

Merged
merged 5 commits into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Error types
use std::error::Error as StdError;
use std::fmt::{self, Display, Formatter};

Expand Down
1 change: 1 addition & 0 deletions src/ffi/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(missing_docs, missing_debug_implementations)]
use std::marker::PhantomData;
use std::os::raw::c_char;
use std::time::Duration;
Expand Down
5 changes: 5 additions & 0 deletions src/kms/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ impl KeyEntry {
self.name.as_str()
}

/// Accessor for the key tags
pub fn tags_as_ref(&self) -> &Vec<EntryTag> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could return a slice to avoid exposing implementation details: self.tags.as_slice()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

&self.tags
}

/// Determine if a key entry refers to a local or external key
pub fn is_local(&self) -> bool {
self.params.reference.is_none()
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#![deny(missing_docs, missing_debug_implementations, rust_2018_idioms)]

#[macro_use]
mod error;
pub mod error;
andrewwhitehead marked this conversation as resolved.
Show resolved Hide resolved
pub use self::error::{Error, ErrorKind};

#[cfg(any(test, feature = "log"))]
Expand All @@ -22,9 +22,9 @@ pub use askar_storage as storage;
pub use askar_storage::future;

#[cfg(feature = "ffi")]
mod ffi;
pub mod ffi;
conanoc marked this conversation as resolved.
Show resolved Hide resolved

pub mod kms;

mod store;
pub mod store;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's in the store module that's not being exposed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the symbols I use from store.
pub use aries_askar::store::{entry, PassKey, Session, Store, StoreKeyMethod};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you just use aries_askar::{entry, PassKey, Session, Store, StoreKeyMethod} though?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. It works.

pub use store::{entry, PassKey, Session, Store, StoreKeyMethod};
1 change: 1 addition & 0 deletions src/store.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! module for askar store and session
use askar_storage::backend::copy_profile;

use crate::{
Expand Down