Loading codegen/src/smithy.rs +9 −9 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ pub struct StructureMember { pub struct OperationShape { pub input: OperationInput, pub output: OperationOutput, pub errors: Option<Vec<OperationError>>, // pub errors: Option<Vec<OperationError>>, pub traits: Traits, } Loading @@ -74,7 +74,7 @@ pub struct OperationOutput { #[derive(Debug, Deserialize)] pub struct OperationError { pub target: String, // pub target: String, } #[derive(Debug, Deserialize)] Loading @@ -96,13 +96,13 @@ pub struct ListMember { #[derive(Debug, Deserialize)] pub struct ServiceShape { pub version: String, pub operations: Vec<ServiceOperation>, // pub version: String, // pub operations: Vec<ServiceOperation>, } #[derive(Debug, Deserialize)] pub struct ServiceOperation { pub target: String, // pub target: String, } #[derive(Debug, Deserialize)] Loading @@ -125,13 +125,13 @@ pub struct EnumShape { #[derive(Debug, Deserialize)] pub struct EnumMember { pub target: String, // pub target: String, pub traits: Traits, } #[derive(Debug, Deserialize)] pub struct BlobShape { pub traits: Traits, // pub traits: Traits, } #[derive(Debug, Deserialize)] Loading @@ -154,13 +154,13 @@ pub struct MapShape { #[derive(Debug, Deserialize)] pub struct MapKey { pub target: String, pub traits: Traits, // pub traits: Traits, } #[derive(Debug, Deserialize)] pub struct MapValue { pub target: String, pub traits: Traits, // pub traits: Traits, } impl Traits { Loading crates/s3s/src/http/multipart.rs +2 −0 Original line number Diff line number Diff line Loading @@ -20,8 +20,10 @@ use transform_stream::{AsyncTryStream, Yielder}; #[derive(Debug)] pub struct File { /// name #[allow(dead_code)] // FIXME: discard this field? pub name: String, /// content type #[allow(dead_code)] // FIXME: discard this field? pub content_type: String, /// stream pub stream: Option<FileStream>, Loading crates/s3s/src/ops/signature.rs +7 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,13 @@ impl SignatureContext<'_> { let presigned_url = PresignedUrlV4::parse(qs).map_err(|err| invalid_request!(err, "missing presigned url v4 fields"))?; if presigned_url.algorithm != "AWS4-HMAC-SHA256" { return Err(s3_error!( NotImplemented, "X-Amz-Algorithm other than AWS4-HMAC-SHA256 is not implemented" )); } // ASK: how to use it? let _content_sha256: Option<AmzContentSha256<'_>> = extract_amz_content_sha256(&self.hs)?; Loading crates/s3s/src/sig_v4/amz_content_sha256.rs +1 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ pub enum AmzContentSha256<'a> { /// single chunk SingleChunk { /// the checksum of single chunk payload #[allow(dead_code)] // TODO: check this field when calculating the payload checksum payload_checksum: &'a str, }, /// `UNSIGNED-PAYLOAD` Loading Loading
codegen/src/smithy.rs +9 −9 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ pub struct StructureMember { pub struct OperationShape { pub input: OperationInput, pub output: OperationOutput, pub errors: Option<Vec<OperationError>>, // pub errors: Option<Vec<OperationError>>, pub traits: Traits, } Loading @@ -74,7 +74,7 @@ pub struct OperationOutput { #[derive(Debug, Deserialize)] pub struct OperationError { pub target: String, // pub target: String, } #[derive(Debug, Deserialize)] Loading @@ -96,13 +96,13 @@ pub struct ListMember { #[derive(Debug, Deserialize)] pub struct ServiceShape { pub version: String, pub operations: Vec<ServiceOperation>, // pub version: String, // pub operations: Vec<ServiceOperation>, } #[derive(Debug, Deserialize)] pub struct ServiceOperation { pub target: String, // pub target: String, } #[derive(Debug, Deserialize)] Loading @@ -125,13 +125,13 @@ pub struct EnumShape { #[derive(Debug, Deserialize)] pub struct EnumMember { pub target: String, // pub target: String, pub traits: Traits, } #[derive(Debug, Deserialize)] pub struct BlobShape { pub traits: Traits, // pub traits: Traits, } #[derive(Debug, Deserialize)] Loading @@ -154,13 +154,13 @@ pub struct MapShape { #[derive(Debug, Deserialize)] pub struct MapKey { pub target: String, pub traits: Traits, // pub traits: Traits, } #[derive(Debug, Deserialize)] pub struct MapValue { pub target: String, pub traits: Traits, // pub traits: Traits, } impl Traits { Loading
crates/s3s/src/http/multipart.rs +2 −0 Original line number Diff line number Diff line Loading @@ -20,8 +20,10 @@ use transform_stream::{AsyncTryStream, Yielder}; #[derive(Debug)] pub struct File { /// name #[allow(dead_code)] // FIXME: discard this field? pub name: String, /// content type #[allow(dead_code)] // FIXME: discard this field? pub content_type: String, /// stream pub stream: Option<FileStream>, Loading
crates/s3s/src/ops/signature.rs +7 −0 Original line number Diff line number Diff line Loading @@ -178,6 +178,13 @@ impl SignatureContext<'_> { let presigned_url = PresignedUrlV4::parse(qs).map_err(|err| invalid_request!(err, "missing presigned url v4 fields"))?; if presigned_url.algorithm != "AWS4-HMAC-SHA256" { return Err(s3_error!( NotImplemented, "X-Amz-Algorithm other than AWS4-HMAC-SHA256 is not implemented" )); } // ASK: how to use it? let _content_sha256: Option<AmzContentSha256<'_>> = extract_amz_content_sha256(&self.hs)?; Loading
crates/s3s/src/sig_v4/amz_content_sha256.rs +1 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ pub enum AmzContentSha256<'a> { /// single chunk SingleChunk { /// the checksum of single chunk payload #[allow(dead_code)] // TODO: check this field when calculating the payload checksum payload_checksum: &'a str, }, /// `UNSIGNED-PAYLOAD` Loading