Skip to main content

lonca_daemon/
protocol.rs

1//! Wire protocol: one JSON object per line over a Unix socket. The shapes a
2//! client needs are in `lonca-client`; here is what only the daemon's
3//! policy knows.
4
5pub use lonca_client::protocol::*;
6use serde::{Deserialize, Serialize};
7
8#[derive(Clone, Debug, Serialize, Deserialize)]
9pub struct PrepareInit {
10    pub repo: String,
11    pub human: String,
12    pub human_key: lonca_core::ops::HumanKey,
13    /// Import trunk from this Git repository (path or URL).
14    #[serde(default)]
15    pub import_from: Option<String>,
16    #[serde(default)]
17    pub branch: Option<String>,
18    /// The settings to start from. `None`: the install's own, hardened on a
19    /// hardened daemon.
20    #[serde(default)]
21    pub profile: Option<lonca_policy::config::Profile>,
22    /// A hardened repository on a machine with no presence key.
23    #[serde(default)]
24    pub without_presence: bool,
25}