feat(apb): added all outbox routes, authed inbox

This commit is contained in:
əlemi 2024-04-22 22:42:45 +02:00
parent 3c6b2ae3e6
commit a763b60a93
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -8,9 +8,12 @@ pub trait Outbox {
async fn create(&self, uid: String, activity: Self::Activity) -> Result<String, Self::Error>;
async fn like(&self, uid: String, activity: Self::Activity) -> Result<String, Self::Error>;
async fn follow(&self, uid: String, activity: Self::Activity) -> Result<String, Self::Error>;
async fn announce(&self, uid: String, activity: Self::Activity) -> Result<String, Self::Error>;
async fn accept(&self, uid: String, activity: Self::Activity) -> Result<String, Self::Error>;
async fn reject(&self, _uid: String, _activity: Self::Activity) -> Result<String, Self::Error>;
async fn undo(&self, uid: String, activity: Self::Activity) -> Result<String, Self::Error>;
async fn delete(&self, uid: String, activity: Self::Activity) -> Result<String, Self::Error>;
async fn update(&self, uid: String, activity: Self::Activity) -> Result<String, Self::Error>;
}
#[async_trait::async_trait]
@ -18,13 +21,13 @@ pub trait Inbox {
type Activity: crate::Activity;
type Error: std::error::Error;
async fn create(&self, activity: Self::Activity) -> Result<(), Self::Error>;
async fn like(&self, activity: Self::Activity) -> Result<(), Self::Error>;
async fn follow(&self, activity: Self::Activity) -> Result<(), Self::Error>;
async fn announce(&self, activity: Self::Activity) -> Result<(), Self::Error>;
async fn accept(&self, activity: Self::Activity) -> Result<(), Self::Error>;
async fn reject(&self, activity: Self::Activity) -> Result<(), Self::Error>;
async fn undo(&self, activity: Self::Activity) -> Result<(), Self::Error>;
async fn delete(&self, activity: Self::Activity) -> Result<(), Self::Error>;
async fn update(&self, activity: Self::Activity) -> Result<(), Self::Error>;
async fn create(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
async fn like(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
async fn follow(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
async fn announce(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
async fn accept(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
async fn reject(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
async fn undo(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
async fn delete(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
async fn update(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
}