pdk 1.3.0-alpha.0

Policy Development Kit
Documentation
// Copyright 2023 Salesforce, Inc. All rights reserved.

pub mod classy {
    #[cfg(feature = "ll")]
    pub use classy::*;

    pub use classy::proxy_wasm;
}

#[cfg(feature = "ll")]
pub use pdk_macros::{entrypoint, entrypoint_flex};

/// # The PDK High Level Framework.
///
/// The PDK High Level Framework is the foundation for writting single-threaded
/// non-blocking filters as main building block for custom policies.
///
/// `pdk::hl` relies on a reduced portion of the Rust async ecosystem, due to the limitations
/// of the underlying WebAssembly platform and their single-threaded nature.
/// Despite being single-threaded, `pdk::hl` supports concurrent execution of
/// multiple incoming HTTP flows (Request/Response pairs).
pub mod hl {

    pub use classy::hl::*;
    pub use pdk_macros::{entrypoint, entrypoint_flex};
}

pub mod logger {
    pub use pdk_core::logger::{debug, error, info, trace, warn};
}

pub mod authentication {
    pub use pdk_core::policy_context::authentication::{
        Authentication, AuthenticationData, AuthenticationHandler,
    };
}

pub mod metadata {
    pub use pdk_core::policy_context::api::*;
}

pub mod jwt {
    pub use jwt_lib::api::*;
}

pub mod cache {
    pub use cache_lib::{builder::CacheBuilder, error::CacheError, Cache};
}

pub mod contracts {
    pub use contracts_lib::*;
}

pub mod cors {
    pub use cors_lib::*;
}

pub mod lock {
    pub use lock_lib::*;
}

pub mod flex_abi {
    pub use pdk_flex_abi::api;
    pub use pdk_flex_abi::entrypoint;
}

pub mod script {
    pub use pdk_script::*;
}

pub mod serde {
    pub use pdk_core::client::{
        deserialize_service, deserialize_service_opt, deserialize_service_opt_vec,
        deserialize_service_vec, service_name,
    };
}

pub mod __internal {
    pub use pdk_core::host::context::root::RootContextAdapter;
    pub use pdk_core::init::configure;
}

#[cfg(feature = "ll")]
pub mod policy_context {
    pub use pdk_core::policy_context::*;
}