1use serde::{Deserialize, Serialize};
3pub use storage_api::*;
4pub const STORAGE_NODE_TYPE: &str = "storage";
5pub const STORAGE_PROTOCOL_VERSION: &str = storage_api::PROTOCOL_VERSION;
6pub const STORAGE_READINESS_ROUTE: &str = "/storage/readiness";
7
8#[derive(Debug, Clone, Serialize, Deserialize)]
9#[serde(rename_all = "camelCase")]
10pub struct ObjectStorageSession {
11 #[serde(default, skip_serializing_if = "Option::is_none")]
12 pub host_identity: Option<artifact_api::HostTlsIdentity>,
13 pub protocol_version: String,
14 pub folder: ObjectStorageFolder,
15 pub endpoint: String,
16 pub access_token: String,
17 #[serde(with = "storage_api::decimal_u64")]
18 pub expires_at_ms: u64,
19 pub permissions: Vec<StoragePermission>,
20}
21
22#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, PartialEq, Eq)]
24#[serde(rename_all = "camelCase", deny_unknown_fields)]
25pub struct StorageEndpointProjection {
26 pub base_url: String,
27 pub host_identity: artifact_api::HostTlsIdentity,
28}