Skip to main content

forte_sdk/
lib.rs

1pub mod bindings;
2pub mod cookie_sign;
3pub mod http;
4pub mod metrics;
5pub(crate) mod otel;
6pub mod rand;
7pub mod runtime;
8pub mod serve;
9pub mod time_wasi;
10
11pub use anyhow;
12pub use chrono;
13pub use cookie::{self, Cookie, CookieBuilder, CookieJar};
14pub use form_urlencoded;
15pub use forte_json;
16pub use forte_macros::{forte_doc, test};
17pub use futures;
18pub use hex;
19pub use serde;
20pub use serde_json;
21pub use sha2;
22pub use time;
23pub use tracing;
24pub use uuid::Uuid;
25pub use wit_bindgen;
26
27pub type DateTime = chrono::DateTime<chrono::Utc>;
28
29pub mod http_header {
30    pub use http::header::*;
31}
32
33pub fn now() -> DateTime {
34    chrono::Utc::now()
35}
36
37pub struct ForteRequest<'a, Body = ()> {
38    pub uri_authority: &'a str,
39    pub method: &'a ::http::Method,
40    pub headers: &'a ::http::HeaderMap,
41    pub jar: &'a mut CookieJar,
42    pub raw_body: &'a [u8],
43    pub body: Body,
44}