()
| 749 | } |
| 750 | |
| 751 | fn generate_cred_id() -> String { |
| 752 | use std::time::SystemTime; |
| 753 | let ts = SystemTime::now() |
| 754 | .duration_since(UNIX_EPOCH) |
| 755 | .unwrap_or_default() |
| 756 | .as_millis(); |
| 757 | // Simple ID: timestamp + random suffix |
| 758 | let random: u32 = rand::random(); |
| 759 | format!("{:x}{:08x}", ts, random) |
| 760 | } |
| 761 | |
| 762 | fn dns_cred_to_proto(cred: DnsCredential) -> DnsCredentialInfo { |
| 763 | let (provider_type, cf_api_token, cf_api_url) = match &cred.provider { |
no outgoing calls
no test coverage detected