aboutsummaryrefslogtreecommitdiff
path: root/src/api/s3_xml.rs
diff options
context:
space:
mode:
authortrinity-1686a <trinity.pointard@gmail.com>2021-12-15 10:41:39 +0100
committerAlex <alex@adnab.me>2021-12-15 10:41:39 +0100
commit60d445992632a4962f709f9c9a19f698caf0e4af (patch)
tree7acf96d8cf8c8095e99aad46e55aaa23b80daf71 /src/api/s3_xml.rs
parent3b3a1f275f18e4b6cbf1fb326ff9263fcf85460c (diff)
downloadgarage-60d445992632a4962f709f9c9a19f698caf0e4af.tar.gz
garage-60d445992632a4962f709f9c9a19f698caf0e4af.zip
BucketWebsite (#174)
fix #77 this does not store anything but a on/off switch for website, and does not implement GetBucketWebsite as it would require storing more. GetBucketWebsite should be pretty easy to implement once data is stored though. Co-authored-by: Trinity Pointard <trinity.pointard@gmail.com> Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/174 Co-authored-by: trinity-1686a <trinity.pointard@gmail.com> Co-committed-by: trinity-1686a <trinity.pointard@gmail.com>
Diffstat (limited to 'src/api/s3_xml.rs')
-rw-r--r--src/api/s3_xml.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/api/s3_xml.rs b/src/api/s3_xml.rs
index f0547961..9b5a0202 100644
--- a/src/api/s3_xml.rs
+++ b/src/api/s3_xml.rs
@@ -1,5 +1,5 @@
use quick_xml::se::to_string;
-use serde::{Serialize, Serializer};
+use serde::{Deserialize, Serialize, Serializer};
use crate::Error as ApiError;
@@ -9,14 +9,14 @@ pub fn to_xml_with_header<T: Serialize>(x: &T) -> Result<String, ApiError> {
Ok(xml)
}
-fn xmlns_tag<S: Serializer>(_v: &(), s: S) -> Result<S::Ok, S::Error> {
+pub fn xmlns_tag<S: Serializer>(_v: &(), s: S) -> Result<S::Ok, S::Error> {
s.serialize_str("http://s3.amazonaws.com/doc/2006-03-01/")
}
-#[derive(Debug, Serialize, PartialEq)]
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
pub struct Value(#[serde(rename = "$value")] pub String);
-#[derive(Debug, Serialize, PartialEq)]
+#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
pub struct IntValue(#[serde(rename = "$value")] pub i64);
#[derive(Debug, Serialize, PartialEq)]