1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
use crate::api::{Labels, Options, StatusMap};
use serde::{Deserialize, Serialize};
#[cfg(feature = "chrono")]
use chrono::{DateTime, Utc};
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct VolumeCreateInfo {
pub name: String,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct VolumesInfo {
#[serde(default)]
pub volumes: Vec<VolumeInfo>,
pub warnings: Option<Vec<String>>,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct VolumeInfo {
pub name: String,
pub driver: String,
pub mountpoint: String,
#[cfg(feature = "chrono")]
pub created_at: DateTime<Utc>,
#[cfg(not(feature = "chrono"))]
pub created_at: String,
pub status: Option<StatusMap>,
pub labels: Option<Labels>,
pub options: Option<Options>,
pub scope: String,
pub usage_data: Option<UsageData>,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct UsageData {
pub size: isize,
pub ref_count: isize,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct VolumesPruneInfo {
pub volumes_deleted: Vec<String>,
pub space_reclaimed: i64,
}