Re-export in facade crate
This commit is contained in:
parent
a6b337c0f4
commit
c1806bf092
19
Cargo.toml
19
Cargo.toml
|
@ -5,7 +5,26 @@ edition = "2021"
|
|||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[features]
|
||||
default = ["utils"]
|
||||
actix-web = ["apub-actix-web"]
|
||||
awc = ["apub-awc"]
|
||||
background-jobs = ["apub-background-jobs"]
|
||||
openssl = ["apub-openssl"]
|
||||
reqwest = ["apub-reqwest"]
|
||||
rustcrypto = ["apub-rustcrypto"]
|
||||
utils = ["apub-breaker-session", "apub-deref-client"]
|
||||
|
||||
[dependencies]
|
||||
apub-actix-web = { version = "0.1.0", path = "./apub-actix-web/", optional = true }
|
||||
apub-awc = { version = "0.1.0", path = "./apub-awc/", optional = true }
|
||||
apub-background-jobs = { version = "0.1.0", path = "./apub-background-jobs/", optional = true }
|
||||
apub-breaker-session = { version = "0.1.0", path = "./apub-breaker-session/", optional = true }
|
||||
apub-core = { version = "0.1.0", path = "./apub-core/" }
|
||||
apub-deref-client = { version = "0.1.0", path = "./apub-deref-client/", optional = true }
|
||||
apub-openssl = { version = "0.1.0", path = "./apub-openssl/", optional = true }
|
||||
apub-reqwest = { version = "0.1.0", path = "./apub-reqwest/", optional = true }
|
||||
apub-rustcrypto = { version = "0.1.0", path = "./apub-rustcrypto/", optional = true }
|
||||
|
||||
[workspace]
|
||||
members = [
|
||||
|
|
55
src/lib.rs
55
src/lib.rs
|
@ -0,0 +1,55 @@
|
|||
pub mod clients {
|
||||
pub use apub_core::deliver::{Activity, Client};
|
||||
pub use apub_core::deref::{Dereference, Repo};
|
||||
pub use apub_core::object_id::ObjectId;
|
||||
|
||||
#[cfg(feature = "apub-deref-client")]
|
||||
pub use apub_deref_client::{Client as CombinedClient, Error as CombinedError};
|
||||
|
||||
#[cfg(feature = "apub-awc")]
|
||||
pub use apub_awc::{
|
||||
AwcClient, AwcError, SignatureConfig as AwcSignatureConfig,
|
||||
SignatureError as AwcSignatureError,
|
||||
};
|
||||
|
||||
#[cfg(feature = "apub-reqwest")]
|
||||
pub use apub_reqwest::{
|
||||
ReqwestClient, ReqwestError, SignatureConfig as ReqwestSignatureConfig,
|
||||
SignatureError as ReqwestSignatureError,
|
||||
};
|
||||
}
|
||||
|
||||
pub mod servers {
|
||||
pub use apub_core::ingest::Ingest;
|
||||
|
||||
#[cfg(feature = "apub-actix-web")]
|
||||
pub use apub_actix_web::{
|
||||
inbox, serve_objects, RepoFactory, RepoFactoryX,
|
||||
SignatureConfig as ActixWebSignatureConfig, Verifier, VerifyError,
|
||||
};
|
||||
}
|
||||
|
||||
pub mod background {
|
||||
#[cfg(feature = "apub-background-jobs")]
|
||||
pub use apub_background_jobs::{
|
||||
client, queue_deliver, ClientFactory, DeliverJob, EnqueueError, JobClient,
|
||||
};
|
||||
}
|
||||
|
||||
pub mod session {
|
||||
pub use apub_core::session::{RequestCountSession, Session, SessionError};
|
||||
|
||||
#[cfg(feature = "apub-breaker-session")]
|
||||
pub use apub_breaker_session::BreakerSession;
|
||||
}
|
||||
|
||||
pub mod crypto {
|
||||
pub use apub_core::digest::{Digest, DigestBuilder, DigestFactory};
|
||||
pub use apub_core::signature::{Sign, SignFactory, Verify, VerifyBuilder};
|
||||
|
||||
#[cfg(feature = "apub-openssl")]
|
||||
pub use apub_openssl::{OpenSsl, OpenSslDigest, OpenSslSigner, OpenSslVerifier};
|
||||
|
||||
#[cfg(feature = "apub-rustcrypto")]
|
||||
pub use apub_rustcrypto::{RsaSigner, RsaVerifier, Rustcrypto, RustcryptoError, Sha256Digest};
|
||||
}
|
Loading…
Reference in a new issue