use surf::http::Method;
use crate::framework::endpoint::Endpoint;
#[derive(Debug)]
pub struct DeleteBulk<'a> {
pub account_identifier: &'a str,
pub namespace_identifier: &'a str,
pub bulk_keys: Vec<String>,
}
impl<'a> Endpoint<(), (), Vec<String>> for DeleteBulk<'a> {
fn method(&self) -> Method {
Method::Delete
}
fn path(&self) -> String {
format!(
"accounts/{}/storage/kv/namespaces/{}/bulk",
self.account_identifier, self.namespace_identifier
)
}
fn body(&self) -> Option<Vec<String>> {
Some(self.bulk_keys.clone())
}
}