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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
use aws::common::params::*;
use aws::s3::endpoint::*;
#[derive(Debug, Clone, PartialEq, RustcDecodable, RustcEncodable)]
pub enum AdminOutputType {
Json,
Xml,
}
#[derive(Debug, Clone, Default)]
pub struct AdminRequest {
pub method: Option<String>,
pub admin_path: Option<String>,
pub path_options: Option<String>,
pub uid: Option<String>,
pub bucket: Option<String>,
pub object: Option<String>,
pub params: Params,
pub endpoint: Option<Endpoint>,
pub access_key: Option<String>,
pub secret_key: Option<String>,
pub format: Option<AdminOutputType>,
}
#[derive(Debug, Clone, RustcDecodable, RustcEncodable)]
pub struct AdminOutput {
pub code: u16,
pub payload: String,
pub format: AdminOutputType,
}
#[derive(Debug, Default, Clone, RustcDecodable, RustcEncodable)]
pub struct AdminUsers {
pub users: Vec<String>,
}
#[derive(Debug, Default, Clone, RustcDecodable, RustcEncodable)]
pub struct AdminBuckets {
pub buckets: Vec<String>,
}
#[derive(Debug, Default, Clone, RustcDecodable, RustcEncodable)]
pub struct AdminUsage {
pub usage: String,
}
#[derive(Debug, Clone, RustcDecodable, RustcEncodable)]
pub struct AdminQuota {
pub enabled: bool,
pub max_size_kb: i64,
pub max_objects: i64,
}
impl Default for AdminQuota {
fn default() -> AdminQuota {
AdminQuota{ enabled: false, max_size_kb: -1, max_objects: -1 }
}
}
#[derive(Debug, Default, Clone, RustcDecodable, RustcEncodable)]
pub struct AdminBucketMetadata {
pub bucket: String,
pub pool: String,
pub index_pool: String,
pub id: String,
pub marker: String,
pub owner: String,
pub ver: String,
pub master_ver: String,
pub mtime: String,
pub max_marker: String,
pub usage: AdminUsage,
pub bucket_quota: AdminQuota,
}