mirror of
https://github.com/LemmyNet/activitypub-federation-rust.git
synced 2024-06-11 09:49:24 +00:00
rename module
This commit is contained in:
parent
d470f9673e
commit
a8c9894052
|
@ -4,7 +4,7 @@ To send an activity we need to initialize our previously defined struct, and pic
|
|||
|
||||
```
|
||||
# use activitypub_federation::config::FederationConfig;
|
||||
# use activitypub_federation::activity_queue::send_activity;
|
||||
# use activitypub_federation::activity_sending::send_activity;
|
||||
# use activitypub_federation::http_signatures::generate_actor_keypair;
|
||||
# use activitypub_federation::traits::Actor;
|
||||
# use activitypub_federation::fetch::object_id::ObjectId;
|
||||
|
|
|
@ -6,7 +6,7 @@ use crate::{
|
|||
DbPost,
|
||||
};
|
||||
use activitypub_federation::{
|
||||
activity_queue::send_activity,
|
||||
activity_sending::send_activity,
|
||||
config::Data,
|
||||
fetch::object_id::ObjectId,
|
||||
kinds::activity::CreateType,
|
||||
|
|
|
@ -6,7 +6,7 @@ use crate::{
|
|||
utils::generate_object_id,
|
||||
};
|
||||
use activitypub_federation::{
|
||||
activity_queue::send_activity,
|
||||
activity_sending::send_activity,
|
||||
config::Data,
|
||||
fetch::{object_id::ObjectId, webfinger::webfinger_resolve_actor},
|
||||
http_signatures::generate_actor_keypair,
|
||||
|
|
|
@ -276,8 +276,8 @@ mod tests {
|
|||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
// Queues 100 messages and then asserts that the worker runs them
|
||||
async fn test_activity_queue_workers() -> anyhow::Result<()> {
|
||||
// Sends 100 messages
|
||||
async fn test_activity_sending() -> anyhow::Result<()> {
|
||||
let num_messages: usize = 100;
|
||||
|
||||
tokio::spawn(test_server());
|
|
@ -57,7 +57,7 @@ where
|
|||
mod test {
|
||||
use super::*;
|
||||
use crate::{
|
||||
activity_queue::generate_request_headers,
|
||||
activity_sending::generate_request_headers,
|
||||
config::FederationConfig,
|
||||
http_signatures::sign_request,
|
||||
traits::tests::{DbConnection, DbUser, Follow, DB_USER_KEYPAIR},
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//! Generating keypairs, creating and verifying signatures
|
||||
//!
|
||||
//! Signature creation and verification is handled internally in the library. See
|
||||
//! [send_activity](crate::activity_queue::send_activity) and
|
||||
//! [send_activity](crate::activity_sending::send_activity) and
|
||||
//! [receive_activity (actix-web)](crate::actix_web::inbox::receive_activity) /
|
||||
//! [receive_activity (axum)](crate::axum::inbox::receive_activity).
|
||||
|
||||
|
@ -274,7 +274,7 @@ pub(crate) fn verify_body_hash(
|
|||
#[cfg(test)]
|
||||
pub mod test {
|
||||
use super::*;
|
||||
use crate::activity_queue::generate_request_headers;
|
||||
use crate::activity_sending::generate_request_headers;
|
||||
use reqwest::Client;
|
||||
use reqwest_middleware::ClientWithMiddleware;
|
||||
use std::str::FromStr;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#![doc = include_str!("../docs/10_fetching_objects_with_unknown_type.md")]
|
||||
#![deny(missing_docs)]
|
||||
|
||||
pub mod activity_queue;
|
||||
pub mod activity_sending;
|
||||
#[cfg(feature = "actix-web")]
|
||||
pub mod actix_web;
|
||||
#[cfg(feature = "axum")]
|
||||
|
|
Loading…
Reference in a new issue