DKIM domain enable + AHash version upgrade.
parent
b0ba1737b1
commit
29ec39d98c
|
@ -20,8 +20,8 @@ async-stream = { version = "0.3", optional = true}
|
|||
serde = { version = "1.0", features = ["derive"]}
|
||||
serde_json = "1.0"
|
||||
chrono = { version = "0.4", features = ["serde"]}
|
||||
ahash = {version = "0.7.6", features = ["serde"]}
|
||||
parking_lot = "0.12.0"
|
||||
ahash = {version = "0.8", features = ["serde"]}
|
||||
parking_lot = "0.12"
|
||||
base64 = "0.13"
|
||||
|
||||
[features]
|
||||
|
|
|
@ -82,7 +82,7 @@ where
|
|||
properties: Option<Vec<U>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize, Eq, PartialEq)]
|
||||
pub enum SetErrorType {
|
||||
#[serde(rename = "forbidden")]
|
||||
Forbidden,
|
||||
|
|
|
@ -12,7 +12,7 @@ use crate::{
|
|||
Get, Method, Set,
|
||||
};
|
||||
|
||||
use super::{Principal, Property, Type};
|
||||
use super::{Principal, Property, Type, DKIM};
|
||||
|
||||
impl Client {
|
||||
pub async fn individual_create(
|
||||
|
@ -52,6 +52,25 @@ impl Client {
|
|||
.created(&id)
|
||||
}
|
||||
|
||||
pub async fn domain_enable_dkim(
|
||||
&self,
|
||||
id: &str,
|
||||
key: impl Into<String>,
|
||||
selector: impl Into<String>,
|
||||
expiration: Option<i64>,
|
||||
) -> crate::Result<Option<Principal>> {
|
||||
let mut request = self.build();
|
||||
request
|
||||
.set_principal()
|
||||
.update(id)
|
||||
.secret(key)
|
||||
.dkim(DKIM::new(Some(selector), expiration));
|
||||
request
|
||||
.send_single::<PrincipalSetResponse>()
|
||||
.await?
|
||||
.updated(id)
|
||||
}
|
||||
|
||||
pub async fn list_create(
|
||||
&self,
|
||||
email: impl Into<String>,
|
||||
|
|
|
@ -156,9 +156,9 @@ pub struct DKIM {
|
|||
}
|
||||
|
||||
impl DKIM {
|
||||
pub fn new(dkim_selector: Option<String>, dkim_expiration: Option<i64>) -> DKIM {
|
||||
pub fn new(dkim_selector: Option<impl Into<String>>, dkim_expiration: Option<i64>) -> DKIM {
|
||||
DKIM {
|
||||
dkim_selector,
|
||||
dkim_selector: dkim_selector.map(Into::into),
|
||||
dkim_expiration,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue