bindizr-core 0.1.0-beta.4

Core models, configuration, DNS record types, and logging utilities for bindizr
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use chrono::{DateTime, Utc};
use sqlx::FromRow;

// Structure for basic creation of SOA records and basic creation of NS records
#[derive(Debug, PartialEq, Eq, Clone, FromRow)]
pub struct Zone {
    pub id: i32,
    pub name: String,        // zone name (e.g.: "example.com")
    pub primary_ns: String,  // primary name server (e.g.: "ns1.example.com")
    pub admin_email: String, // admin email (e.g.: "admin.example.com")
    pub ttl: i32,            // default TTL (seconds)
    pub serial: i32,         // serial number (SOA record)
    pub refresh: i32,        // refresh period (seconds)
    pub retry: i32,          // retry period (seconds)
    pub expire: i32,         // expire period (seconds)
    pub minimum_ttl: i32,    // minimum TTL (seconds)
    pub created_at: DateTime<Utc>,
}