Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
flaneur2020 committed Aug 8, 2024
1 parent 401efdd commit b3a6d50
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 33 deletions.
1 change: 0 additions & 1 deletion src/aws/v4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use crate::ctx::SigningMethod;
use crate::hash::hex_hmac_sha256;
use crate::hash::hex_sha256;
use crate::hash::hmac_sha256;
use crate::request::SignableRequest;
use crate::sign::Sign;
use crate::time::format_date;
use crate::time::format_iso8601;
Expand Down
1 change: 0 additions & 1 deletion src/azure/storage/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use crate::ctx::SigningContext;
use crate::ctx::SigningMethod;
use crate::hash::base64_decode;
use crate::hash::base64_hmac_sha256;
use crate::request::SignableRequest;
use crate::time;
use crate::time::format_http_date;
use crate::time::DateTime;
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ pub use tencent::*;
mod ctx;
mod dirs;
mod hash;
mod request;
mod sign;
mod time;
pub use sign::Sign;
12 changes: 5 additions & 7 deletions src/oracle/oci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use std::fmt::Write;

use super::credential::Credential;
use crate::ctx::SigningContext;
use crate::request::SignableRequest;
use crate::time;
use crate::time::DateTime;

Expand All @@ -25,9 +24,9 @@ pub struct APIKeySigner {}

impl APIKeySigner {
/// Building a signing context.
fn build(&self, req: &mut impl SignableRequest, cred: &Credential) -> Result<SigningContext> {
fn build(&self, parts: &mut http::request::Parts, cred: &Credential) -> Result<SigningContext> {
let now = time::now();
let mut ctx = req.build()?;
let mut ctx = SigningContext::build(parts)?;

let string_to_sign = string_to_sign(&mut ctx, now)?;
let private_key = if let Some(path) = &cred.key_file {
Expand Down Expand Up @@ -62,10 +61,9 @@ impl APIKeySigner {
}

/// Signing request with header.
pub fn sign(&self, req: &mut impl SignableRequest, cred: &Credential) -> Result<()> {
let ctx = self.build(req, cred)?;

req.apply(ctx)
pub fn sign(&self, parts: &mut http::request::Parts, cred: &Credential) -> Result<()> {
let ctx = self.build(parts, cred)?;
ctx.apply(parts)
}
}

Expand Down
23 changes: 0 additions & 23 deletions src/request.rs

This file was deleted.

0 comments on commit b3a6d50

Please sign in to comment.