atlas_common/storage/
config.rs1use super::types::StorageType;
4use serde::{Deserialize, Serialize};
5
6#[derive(Debug, Clone, Serialize, Deserialize)]
10pub struct StorageConfig {
11 pub storage_type: StorageType,
13
14 pub url: Option<String>,
16
17 pub path: Option<String>,
19
20 pub credentials: Option<StorageCredentials>,
22
23 pub options: Option<serde_json::Value>,
25}
26
27#[derive(Debug, Clone, Serialize, Deserialize)]
31pub struct StorageCredentials {
32 pub username: Option<String>,
34
35 pub password: Option<String>,
37
38 pub token: Option<String>,
40
41 pub api_key: Option<String>,
43}
44
45impl Default for StorageConfig {
46 fn default() -> Self {
48 Self {
49 storage_type: StorageType::Filesystem,
50 url: None,
51 path: Some("/tmp/atlas-storage".to_string()),
52 credentials: None,
53 options: None,
54 }
55 }
56}