break out module

This commit is contained in:
2024-07-25 21:16:42 +02:00
parent 9b68b32354
commit 787f74e3ec
4 changed files with 35 additions and 30 deletions

View File

@@ -0,0 +1,27 @@
use std::collections::HashMap;
use serde;
#[derive(serde::Serialize, serde::Deserialize, Clone, Debug)]
pub struct DnsRecord {
pub id: Box<str>,
#[serde(rename = "type")]
pub record_type: Box<str>,
pub name: Box<str>,
pub content: Box<str>,
pub ttl: u32,
pub proxied: bool,
pub locked: bool,
pub zone_id: Box<str>,
pub zone_name: Box<str>,
pub modified_on: Box<str>,
pub created_on: Box<str>,
pub meta: HashMap<Box<str>, serde_json::Value>,
}
#[derive(serde::Serialize, serde::Deserialize, Debug)]
pub struct CloudflareResponse {
pub success: bool,
pub errors: Box<[HashMap<Box<str>, serde_json::Value>]>,
pub messages: Box<[HashMap<Box<str>, serde_json::Value>]>,
pub result: Option<Vec<DnsRecord>>,
}