canic_core/dto/
topology.rs1use crate::dto::{canister::CanisterInfo, prelude::*};
2
3#[derive(CandidType, Clone, Debug, Deserialize, Serialize)]
8pub struct AppRegistryResponse(pub Vec<AppRegistryEntry>);
9
10#[derive(CandidType, Clone, Debug, Deserialize, Serialize)]
15pub struct AppRegistryEntry {
16 pub subnet_pid: Principal,
17 pub root_pid: Principal,
18}
19
20#[derive(CandidType, Clone, Debug, Deserialize, Serialize)]
29pub struct SubnetRegistryResponse(pub Vec<SubnetRegistryEntry>);
30
31#[derive(CandidType, Clone, Debug, Deserialize, Serialize)]
40pub struct SubnetRegistryEntry {
41 pub pid: Principal,
42 pub role: CanisterRole,
43 pub record: CanisterInfo,
44}
45
46#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
51pub struct AppDirectoryArgs(pub Vec<DirectoryEntryInput>);
52
53#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
58pub struct SubnetDirectoryArgs(pub Vec<DirectoryEntryInput>);
59
60#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
65pub struct DirectoryEntryInput {
66 pub role: CanisterRole,
67 pub pid: Principal,
68}
69
70#[derive(CandidType, Clone, Debug, Deserialize, Eq, PartialEq, Serialize)]
75pub struct DirectoryEntryResponse {
76 pub role: CanisterRole,
77 pub pid: Principal,
78}