fix: update detee-shared dependency source and refactor imports
This commit is contained in:
parent
720fabb022
commit
fd297488e2
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -316,7 +316,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "detee-shared"
|
name = "detee-shared"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+ssh://git@gitea.detee.cloud/noormohammedb/detee-shared#b162dd99c0fe6f53e192eeb3576845b15d851934"
|
source = "git+ssh://git@gitea.detee.cloud/noormohammedb/detee-shared#78c84299947e887fe8d8c737656318f409c7f0b4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"prost",
|
"prost",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use anyhow::{anyhow, Result};
|
use anyhow::{anyhow, Result};
|
||||||
use detee_shared::pb_types::shared::Container as ContainerConfig;
|
use detee_shared::types::shared::Container as ContainerConfig;
|
||||||
use detee_shared::pb_types::shared::Resource as ResourceConfig;
|
use detee_shared::types::shared::Resource as ResourceConfig;
|
||||||
|
|
||||||
use crate::container::delete_enclave;
|
use crate::container::delete_enclave;
|
||||||
use crate::container::deploy_enclave;
|
use crate::container::deploy_enclave;
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use prost::Message;
|
|
||||||
|
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::{net::SocketAddr, str::FromStr};
|
use std::{net::SocketAddr, str::FromStr};
|
||||||
@ -14,7 +13,7 @@ use detee_shared::pb::daemon::{
|
|||||||
};
|
};
|
||||||
use detee_shared::pb::shared::Container as ContainerPB;
|
use detee_shared::pb::shared::Container as ContainerPB;
|
||||||
|
|
||||||
use detee_shared::pb_types::shared::Container as ContainerConfig;
|
use detee_shared::types::shared::Container as ContainerConfig;
|
||||||
|
|
||||||
use crate::utils::handle_package;
|
use crate::utils::handle_package;
|
||||||
use crate::DaemonState;
|
use crate::DaemonState;
|
||||||
@ -61,7 +60,8 @@ impl DaemonServicePB for DaemonServer {
|
|||||||
.await
|
.await
|
||||||
.map_err(|err| tonic::Status::internal(err.to_string()))?;
|
.map_err(|err| tonic::Status::internal(err.to_string()))?;
|
||||||
|
|
||||||
let req_container = ContainerConfig::decode(&req_data.encode_to_vec()[..]).unwrap();
|
let req_container: ContainerConfig = req_data.into();
|
||||||
|
let container_uuid = req_container.uuid.clone().unwrap_or_default().uuid;
|
||||||
|
|
||||||
let mapped_ports = self
|
let mapped_ports = self
|
||||||
.data
|
.data
|
||||||
@ -81,7 +81,7 @@ impl DaemonServicePB for DaemonServer {
|
|||||||
|
|
||||||
return Ok(tonic::Response::new(NewContainerRes {
|
return Ok(tonic::Response::new(NewContainerRes {
|
||||||
container_id: Some(detee_shared::pb::shared::Uuid {
|
container_id: Some(detee_shared::pb::shared::Uuid {
|
||||||
uuid: req_data.uuid.unwrap_or_default().uuid,
|
uuid: container_uuid,
|
||||||
}),
|
}),
|
||||||
status: "success".to_string(),
|
status: "success".to_string(),
|
||||||
ip_address: "".to_string(),
|
ip_address: "".to_string(),
|
||||||
|
Loading…
Reference in New Issue
Block a user