FederationRepository (34 methods) → 4 focused traits:
ActivityRepository (2) — idempotency tracking
FollowRepository (18) — follower/following graph + migration
ActorRepository (6) — keypairs, remote actor cache, announce tracking
BlocklistRepository (8) — domain + actor blocklists
ApObjectHandler (10 methods) → 2 traits:
ApContentReader (3) — get_local_objects_for_user/page, count_local_posts
ApObjectHandler (9) — all inbox callbacks (on_create, on_mention, etc.)
Builder changes from positional args to named setters:
ActivityPubService::builder(base_url)
.activity_repo(arc)
.follow_repo(arc)
.actor_repo(arc)
.blocklist_repo(arc)
.user_repo(arc)
.content_reader(arc)
.object_handler(arc)
.build()
No behaviour changes.
34 lines
942 B
Rust
34 lines
942 B
Rust
pub mod activities;
|
|
pub mod actor_handler;
|
|
pub mod actors;
|
|
pub mod content;
|
|
pub mod data;
|
|
pub mod error;
|
|
pub mod federation;
|
|
pub mod followers_handler;
|
|
pub mod inbox;
|
|
pub mod nodeinfo;
|
|
pub mod outbox;
|
|
pub mod repository;
|
|
pub mod service;
|
|
pub(crate) mod urls;
|
|
pub mod user;
|
|
pub mod webfinger;
|
|
|
|
pub use urls::AS_PUBLIC;
|
|
pub use activitypub_federation::kinds::object::NoteType;
|
|
pub use content::{ApContentReader, ApObjectHandler};
|
|
pub use data::{EventPublisher, FederationData, FederationEvent};
|
|
pub use error::Error;
|
|
pub use federation::ApFederationConfig;
|
|
pub use repository::{
|
|
ActivityRepository, ActorRepository, BlockedDomain, BlocklistRepository,
|
|
Follower, FollowerStatus, FollowingStatus, FollowRepository, RemoteActor,
|
|
};
|
|
pub use service::ActivityPubService;
|
|
pub use user::{ApActorType, ApProfileField, ApUser, ApUserRepository, ApVisibility, LookedUpActor};
|
|
|
|
#[cfg(test)]
|
|
#[path = "tests/integration.rs"]
|
|
mod integration_tests;
|