]> Untitled Git - lemmy.git/blob - crates/apub/src/protocol/mod.rs
Move activity structs to protocol folder
[lemmy.git] / crates / apub / src / protocol / mod.rs
1 use activitystreams::object::kind::ImageType;
2 use serde::{Deserialize, Serialize};
3 use url::Url;
4
5 use lemmy_apub_lib::values::MediaTypeMarkdown;
6
7 pub mod activities;
8 pub(crate) mod collections;
9 pub(crate) mod objects;
10
11 #[derive(Clone, Debug, Deserialize, Serialize)]
12 #[serde(rename_all = "camelCase")]
13 pub struct Source {
14   pub(crate) content: String,
15   pub(crate) media_type: MediaTypeMarkdown,
16 }
17
18 #[derive(Clone, Debug, Deserialize, Serialize)]
19 #[serde(rename_all = "camelCase")]
20 pub struct ImageObject {
21   #[serde(rename = "type")]
22   pub(crate) kind: ImageType,
23   pub(crate) url: Url,
24 }