Skip to main content

vyn_core/
models.rs

1use serde::{Deserialize, Serialize};
2
3/// Persisted vault configuration, stored in `.vyn/config.toml`.
4#[derive(Debug, Clone, Serialize, Deserialize)]
5pub struct VaultConfig {
6    pub vault_id: String,
7    pub project_name: Option<String>,
8    pub storage_provider: String,
9    pub relay_url: Option<String>,
10}
11
12/// Persisted identity, stored in `.vyn/identity.toml`.
13#[derive(Debug, Clone, Serialize, Deserialize)]
14pub struct IdentityConfig {
15    pub github_username: String,
16    pub ssh_private_key: String,
17    pub ssh_public_key: String,
18}
19
20/// A single entry in the push/pull history log, stored under `.vyn/history/`.
21#[derive(Debug, Clone, Serialize, Deserialize)]
22pub struct HistoryEntry {
23    pub timestamp_unix: u64,
24    /// `"push"` or `"pull"`.
25    pub source: String,
26    pub manifest_version: u64,
27    pub file_count: usize,
28}