cloudflare/endpoints/workers/
delete_tail.rs

1use surf::http::Method;
2
3use crate::framework::endpoint::Endpoint;
4
5/// Delete Tail
6/// https://api.cloudflare.com/#worker-delete-tail
7#[derive(Debug)]
8pub struct DeleteTail<'a> {
9    /// Account id of owner of the script
10    pub account_identifier: &'a str,
11    /// The name of the script to remove the Tail session from
12    pub script_name: &'a str,
13    /// The unique identifier of the Tail session
14    pub tail_id: &'a str,
15}
16
17impl<'a> Endpoint<()> for DeleteTail<'a> {
18    fn method(&self) -> Method {
19        Method::Delete
20    }
21    fn path(&self) -> String {
22        format!(
23            "accounts/{}/workers/scripts/{}/tails/{}",
24            self.account_identifier, self.script_name, self.tail_id
25        )
26    }
27}