update CallParameters

This commit is contained in:
vms 2020-12-22 15:09:39 +03:00
parent a555291c1c
commit 94a721abf4

View File

@ -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.