use crate::indexer::types::RecordTypes; use ipld_core::cid::Cid; use serde::Deserialize; use serde_bytes::ByteBuf; #[derive(Debug, Deserialize)] #[serde(untagged)] pub enum CarEntry { Mst(CarMstEntry), Commit(CarCommitEntry), Record(RecordTypes), } #[derive(Debug, Deserialize)] pub struct CarMstEntry { pub l: Option, pub e: Vec, } #[derive(Debug, Deserialize)] pub struct CarMstEntryNode { pub p: i32, pub k: ByteBuf, pub v: Cid, pub t: Option, } #[derive(Debug, Deserialize)] pub struct CarCommitEntry { pub did: String, pub version: i32, pub data: Cid, pub rev: String, pub prev: Option, pub sig: ByteBuf, } #[derive(Debug, Deserialize)] pub struct GetRepoStatusRes { pub did: String, pub active: bool, pub status: Option, pub rev: Option, }