autopush_common/db/
routing.rs1#[allow(dead_code)]
3#[derive(Clone, Eq, PartialEq, Debug)]
4pub(crate) enum StorageType {
5 BigTable,
6 None,
7}
8
9impl Default for StorageType {
10 fn default() -> StorageType {
11 if cfg!(feature = "bigtable") {
12 StorageType::BigTable
13 } else {
14 StorageType::None
15 }
16 }
17}
18
19impl From<&str> for StorageType {
20 fn from(str: &str) -> StorageType {
21 match str.to_lowercase().as_str() {
22 "bigtable" => StorageType::BigTable,
23 _ => {
24 warn!("Using default StorageType for {str}");
25 StorageType::default()
26 }
27 }
28 }
29}