Skip to main content

systemprompt_models/profile/
storage.rs

1//! File storage backend selection for a profile.
2//!
3//! Copyright (c) systemprompt.io — Business Source License 1.1.
4//! See <https://systemprompt.io> for licensing details.
5
6use serde::{Deserialize, Serialize};
7
8#[derive(
9    Debug, Clone, Copy, PartialEq, Eq, Default, Serialize, Deserialize, schemars::JsonSchema,
10)]
11#[serde(rename_all = "lowercase")]
12pub enum StorageBackend {
13    #[default]
14    Local,
15}
16
17/// Where user-visible files are written and whether the root is shared
18/// between replicas.
19///
20/// `shared: true` declares that `paths.storage` is a mount every replica can
21/// see; boot warns when the declaration and the observed mount disagree.
22#[derive(
23    Debug, Clone, Copy, PartialEq, Eq, Default, Serialize, Deserialize, schemars::JsonSchema,
24)]
25#[serde(deny_unknown_fields)]
26pub struct StorageConfig {
27    #[serde(default)]
28    pub backend: StorageBackend,
29    #[serde(default)]
30    pub shared: bool,
31}