cloudflare/endpoints/workerskv/
delete_bulk.rs1use surf::http::Method;
2
3use crate::framework::endpoint::Endpoint;
4
5#[derive(Debug)]
10pub struct DeleteBulk<'a> {
11 pub account_identifier: &'a str,
12 pub namespace_identifier: &'a str,
13 pub bulk_keys: Vec<String>,
14}
15
16impl<'a> Endpoint<(), (), Vec<String>> for DeleteBulk<'a> {
17 fn method(&self) -> Method {
18 Method::Delete
19 }
20 fn path(&self) -> String {
21 format!(
22 "accounts/{}/storage/kv/namespaces/{}/bulk",
23 self.account_identifier, self.namespace_identifier
24 )
25 }
26 fn body(&self) -> Option<Vec<String>> {
27 Some(self.bulk_keys.clone())
28 }
29 }