Initial Tessera backup vault (M0–M2)
Scaffold Rust workspace, React canvas, vault engine, hub API, providers, agent wormhole path, and Docker compose per SPEC.
This commit is contained in:
45
crates/tessera-core/src/config.rs
Normal file
45
crates/tessera-core/src/config.rs
Normal file
@@ -0,0 +1,45 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct VaultConfig {
|
||||
pub vault_id: Uuid,
|
||||
pub vault_path: String,
|
||||
pub created_at: chrono::DateTime<chrono::Utc>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct HubConfig {
|
||||
pub listen: String,
|
||||
pub data_dir: String,
|
||||
pub admin_password_hash: Option<String>,
|
||||
}
|
||||
|
||||
impl Default for HubConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
listen: "0.0.0.0:8787".into(),
|
||||
data_dir: "./data".into(),
|
||||
admin_password_hash: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
pub enum ProviderKind {
|
||||
Filesystem,
|
||||
Postgres,
|
||||
Command,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct OrbitSpec {
|
||||
pub id: Uuid,
|
||||
pub name: String,
|
||||
pub provider: ProviderKind,
|
||||
pub provider_config: serde_json::Value,
|
||||
pub schedule: Option<String>,
|
||||
pub decay_preset: String,
|
||||
pub dry_run: bool,
|
||||
}
|
||||
Reference in New Issue
Block a user