Merge pull request #15 from fluencelabs/call_parameters_v3

Update CallParameters
This commit is contained in:
vms 2020-12-22 15:29:42 +03:00 committed by GitHub
commit 71591f412c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 28 additions and 36 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "fluence"
version = "0.2.12" # remember to update html_root_url
version = "0.2.13" # remember to update html_root_url
description = "Fluence backend SDK for developing backend applications for the Fluence network"
documentation = "https://docs.rs/fluence/"
repository = "https://github.com/fluencelabs/rust-sdk"
@ -18,8 +18,8 @@ all-features = true
path = "src/lib.rs"
[dependencies]
fluence-sdk-macro = { path = "crates/macro", version = "=0.2.12" }
fluence-sdk-main = { path = "crates/main", version = "=0.2.12" }
fluence-sdk-macro = { path = "crates/macro", version = "=0.2.13" }
fluence-sdk-main = { path = "crates/main", version = "=0.2.13" }
[features]
# Print some internal logs by log_utf8_string

View File

@ -1,6 +1,6 @@
[package]
name = "fluence-sdk-macro"
version = "0.2.12" # remember to update html_root_url
version = "0.2.13" # remember to update html_root_url
edition = "2018"
description = "Definition of `#[invoke_handler]` attribute"
documentation = "https://docs.rs/fluence/fluence-sdk-macro"
@ -17,4 +17,4 @@ all-features = true
proc-macro = true
[dependencies]
fluence-sdk-wit = { path = "../wit", version = "=0.2.12" }
fluence-sdk-wit = { path = "../wit", version = "=0.2.13" }

View File

@ -54,7 +54,7 @@
//!
//! ```
#![doc(html_root_url = "https://docs.rs/fluence-sdk-macro/0.2.12")]
#![doc(html_root_url = "https://docs.rs/fluence-sdk-macro/0.2.13")]
#![deny(
dead_code,
nonstandard_style,

View File

@ -1,6 +1,6 @@
[package]
name = "fluence-sdk-main"
version = "0.2.12" # remember to update html_root_url
version = "0.2.13" # remember to update html_root_url
edition = "2018"
description = "Rust SDK for applications for the Fluence network"
documentation = "https://docs.rs/fluence/fluence-sdk-macro"
@ -18,7 +18,7 @@ path = "src/lib.rs"
crate-type = ["rlib"]
[dependencies]
fluence-sdk-macro = { path = "../macro", version = "=0.2.12" }
fluence-sdk-macro = { path = "../macro", version = "=0.2.13" }
log = { version = "0.4.8", features = ["std"] }
serde = "=1.0.118"

View File

@ -33,31 +33,23 @@ pub struct SecurityTetraplet {
#[fce]
#[derive(Clone, PartialEq, Default, Eq, Debug, Serialize, Deserialize)]
pub struct CallParameters {
pub call_id: String,
pub user_name: String,
pub application_id: String,
pub tetraplets: Vec<Vec<SecurityTetraplet>>,
}
/// Peer id of the AIR script initiator.
pub init_peer_id: String,
impl CallParameters {
pub fn new<C, U, A>(
call_id: C,
user_name: U,
application_id: A,
tetraplets: Vec<Vec<SecurityTetraplet>>,
) -> Self
where
C: Into<String>,
U: Into<String>,
A: Into<String>,
{
Self {
call_id: call_id.into(),
user_name: user_name.into(),
application_id: application_id.into(),
tetraplets,
}
}
/// Id of the current service.
pub service_id: String,
/// Id of the service creator.
pub service_creator_peer_id: String,
/// Id of the host which run this service.
pub host_id: String,
/// Id of the particle which execution resulted a call this service.
pub particle_id: String,
/// Security tetraplets which described origin of the arguments.
pub tetraplets: Vec<Vec<SecurityTetraplet>>,
}
/// This functions takes from host current call parameters.

View File

@ -19,7 +19,7 @@
#![allow(clippy::missing_safety_doc)]
#![allow(clippy::needless_doctest_main)]
#![doc(html_root_url = "https://docs.rs/fluence-sdk-main/0.2.12")]
#![doc(html_root_url = "https://docs.rs/fluence-sdk-main/0.2.13")]
#![deny(
dead_code,
nonstandard_style,

View File

@ -1,6 +1,6 @@
[package]
name = "fluence-sdk-wit"
version = "0.2.12" # remember to update html_root_url
version = "0.2.13" # remember to update html_root_url
edition = "2018"
description = "Webassembly interface-types generator"
documentation = "https://docs.rs/fluence/fluence-sdk-macro"

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
#![doc(html_root_url = "https://docs.rs/wit-support/0.2.12")]
#![doc(html_root_url = "https://docs.rs/wit-support/0.2.13")]
#![deny(
dead_code,
nonstandard_style,

View File

@ -55,7 +55,7 @@
//! pub fn curl_get(url: String) -> String;
//! }
//! ```
#![doc(html_root_url = "https://docs.rs/fluence/0.2.12")]
#![doc(html_root_url = "https://docs.rs/fluence/0.2.13")]
#![deny(
dead_code,
nonstandard_style,