APIs for links and references in the ATmosphere

add "origin" to events (replay, live, backfill)

just to make more source-like terminology happen

+4 -2
+3 -2
spacedust/src/lib.rs
··· 16 16 #[derive(Debug, Serialize)] 17 17 #[serde(rename_all="snake_case")] 18 18 pub struct ClientEvent { 19 - kind: String, 19 + kind: String, // "link" 20 + origin: String, // "live", "replay", "backfill" 20 21 link: ClientLinkEvent, 21 22 } 22 23 23 24 #[derive(Debug, Serialize)] 24 25 struct ClientLinkEvent { 25 - operation: String, 26 + operation: String, // "create", "delete" (prob no update, though maybe for rev?) 26 27 source: String, 27 28 source_record: String, 28 29 source_rev: String,
+1
spacedust/src/subscriber.rs
··· 51 51 52 52 let ev = ClientEvent { 53 53 kind: "link".to_string(), 54 + origin: "live".to_string(), 54 55 link: link.into(), 55 56 }; 56 57 let json = serde_json::to_string(&ev)?;