canic_core/api/ic/mgmt.rs
1use crate::{
2 cdk::types::Principal,
3 dto::{canister::CanisterStatusResponse, error::Error},
4 workflow::ic::mgmt::MgmtWorkflow,
5};
6
7///
8/// MgmtApi
9///
10
11pub struct MgmtApi;
12
13impl MgmtApi {
14 pub async fn canister_status(pid: Principal) -> Result<CanisterStatusResponse, Error> {
15 MgmtWorkflow::canister_status(pid)
16 .await
17 .map_err(Error::from)
18 }
19}