canic-core 0.24.8

Canic — a canister orchestration and management toolkit for the Internet Computer
Documentation
use crate::{
    dto::topology::{AppRegistryResponse, SubnetRegistryResponse},
    ops::storage::registry::{
        app::AppRegistryOps, mapper::AppRegistryResponseMapper, subnet::SubnetRegistryOps,
    },
};

///
/// AppRegistryQuery
///

pub struct AppRegistryQuery;

impl AppRegistryQuery {
    pub fn registry() -> AppRegistryResponse {
        let data = AppRegistryOps::data();

        AppRegistryResponseMapper::record_to_response(data)
    }
}

///
/// SubnetRegistryQuery
///

pub struct SubnetRegistryQuery;

impl SubnetRegistryQuery {
    pub fn registry() -> SubnetRegistryResponse {
        SubnetRegistryOps::response()
    }
}