feat(apb): added all outbox routes, authed inbox
This commit is contained in:
parent
3c6b2ae3e6
commit
a763b60a93
1 changed files with 12 additions and 9 deletions
|
@ -8,9 +8,12 @@ pub trait Outbox {
|
||||||
async fn create(&self, uid: String, activity: Self::Activity) -> Result<String, Self::Error>;
|
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 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 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 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 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 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]
|
#[async_trait::async_trait]
|
||||||
|
@ -18,13 +21,13 @@ pub trait Inbox {
|
||||||
type Activity: crate::Activity;
|
type Activity: crate::Activity;
|
||||||
type Error: std::error::Error;
|
type Error: std::error::Error;
|
||||||
|
|
||||||
async fn create(&self, activity: Self::Activity) -> Result<(), Self::Error>;
|
async fn create(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
|
||||||
async fn like(&self, activity: Self::Activity) -> Result<(), Self::Error>;
|
async fn like(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
|
||||||
async fn follow(&self, activity: Self::Activity) -> Result<(), Self::Error>;
|
async fn follow(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
|
||||||
async fn announce(&self, activity: Self::Activity) -> Result<(), Self::Error>;
|
async fn announce(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
|
||||||
async fn accept(&self, activity: Self::Activity) -> Result<(), Self::Error>;
|
async fn accept(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
|
||||||
async fn reject(&self, activity: Self::Activity) -> Result<(), Self::Error>;
|
async fn reject(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
|
||||||
async fn undo(&self, activity: Self::Activity) -> Result<(), Self::Error>;
|
async fn undo(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
|
||||||
async fn delete(&self, activity: Self::Activity) -> Result<(), Self::Error>;
|
async fn delete(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
|
||||||
async fn update(&self, activity: Self::Activity) -> Result<(), Self::Error>;
|
async fn update(&self, server: String, activity: Self::Activity) -> Result<(), Self::Error>;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue