1#![allow(unused_parens, deprecated)]
2
3use uuid::{Uuid, uuid};
4
5#[macro_use]
6mod macros;
7mod commands;
8mod error;
9mod options;
10mod subscription;
11mod types;
12
13pub use commands::*;
15pub use error::*;
17pub use options::*;
18pub use subscription::*;
19pub use types::*;
20
21pub use sierradb_protocol::{CurrentVersion, ErrorCode, ExpectedVersion, VersionGap};
23
24pub const NAMESPACE_PARTITION_KEY: Uuid = uuid!("219bd637-e279-53e9-9e2b-eabe5d9120cc");
26
27pub fn stream_partition_key(stream_id: &str) -> Uuid {
28 Uuid::new_v5(&NAMESPACE_PARTITION_KEY, stream_id.as_bytes())
29}