mirror of
https://github.com/fluencelabs/marine-rs-sdk
synced 2025-03-15 22:30:50 +00:00
update CallParameters
This commit is contained in:
parent
a555291c1c
commit
94a721abf4
@ -33,31 +33,23 @@ pub struct SecurityTetraplet {
|
|||||||
#[fce]
|
#[fce]
|
||||||
#[derive(Clone, PartialEq, Default, Eq, Debug, Serialize, Deserialize)]
|
#[derive(Clone, PartialEq, Default, Eq, Debug, Serialize, Deserialize)]
|
||||||
pub struct CallParameters {
|
pub struct CallParameters {
|
||||||
pub call_id: String,
|
/// Peer id of the AIR script initiator.
|
||||||
pub user_name: String,
|
pub init_peer_id: String,
|
||||||
pub application_id: String,
|
|
||||||
pub tetraplets: Vec<Vec<SecurityTetraplet>>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl CallParameters {
|
/// Id of the current service.
|
||||||
pub fn new<C, U, A>(
|
pub service_id: String,
|
||||||
call_id: C,
|
|
||||||
user_name: U,
|
/// Id of the service creator.
|
||||||
application_id: A,
|
pub service_creator_peer_id: String,
|
||||||
tetraplets: Vec<Vec<SecurityTetraplet>>,
|
|
||||||
) -> Self
|
/// Id of the host which run this service.
|
||||||
where
|
pub host_id: String,
|
||||||
C: Into<String>,
|
|
||||||
U: Into<String>,
|
/// Id of the particle which execution resulted a call this service.
|
||||||
A: Into<String>,
|
pub particle_id: String,
|
||||||
{
|
|
||||||
Self {
|
/// Security tetraplets which described origin of the arguments.
|
||||||
call_id: call_id.into(),
|
pub tetraplets: Vec<Vec<SecurityTetraplet>>,
|
||||||
user_name: user_name.into(),
|
|
||||||
application_id: application_id.into(),
|
|
||||||
tetraplets,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This functions takes from host current call parameters.
|
/// This functions takes from host current call parameters.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user