digd.js/samples/db.js

67 lines
3.3 KiB
JavaScript

'use strict';
module.exports = {
"primaryNameservers": [ 'localhost' ] // 'ns1.redirect-www.org'
, "domains": [
{ "id": "daplie.me", "revokedAt": 0 }
, { "id": "oneal.daplie.me", "revokedAt": 0 }
, { "id": "aj.oneal.daplie.me", "revokedAt": 0, "vanityNs": [ 'ns1.daplie.me', 'ns2.daplie.me' ] }
]
, "records": [
// zone daplie.me should be able to have some records on its own
{ "zone": "daplie.me", "name": "daplie.me", "tld": "me", "sld": "daplie", "sub": ""
, "type": "A", "address": "23.228.168.108", "aname": "tardigrade.devices.daplie.me" }
, { "zone": "daplie.me", "name": "www.daplie.me", "tld": "me", "sld": "daplie", "sub": "www"
, "type": "A", "address": "23.228.168.108", "aname": "tardigrade.devices.daplie.me" }
, { "zone": "daplie.me", "name": "email.daplie.me", "tld": "me", "sld": "daplie", "sub": "email"
, "type": "CNAME", "data": "mailgun.org" }
, { "zone": "daplie.me", "name": "tardigrade.devices.daplie.me", "tld": "me", "sld": "daplie", "sub": "tardigrade.devices"
, "device": "abcdef123"
, "type": "ANAME", "address": "23.228.168.108" }
// zone daplie.me can delegate oneal.daplie.me to the same nameserver
// (it's probably programmatically and politically simplest to always delegate from a parent zone)
// Thought Experiment: could we delegate the root to a child? i.e. daplie.me -> www.daplie.me
// to let someone exclusively "own" the root domain, but none of the children?
, { "zone": "daplie.me", "type": "NS", "name": "oneal.daplie.me"
, "tld": "me", "sld": "daplie", "sub": "oneal", "data": "ns1.redirect-www.org" }
, { "zone": "daplie.me", "name": "oneal.daplie.me", "tld": "me", "sld": "daplie", "sub": "oneal"
, "type": "NS", "data": "ns2.redirect-www.org" }
//
// now the zone "oneal.daplie.me" can be independently owned (and delegated)
// ... but what about email for aj@daplie.me with aj@daplie.me?
, { "zone": "oneal.daplie.me", "name": "oneal.daplie.me", "tld": "daplie.me", "sld": "oneal", "sub": ""
, "type": "A", "address": "45.56.59.142", "aname": "leo.devices.oneal.daplie.me" }
, { "zone": "oneal.daplie.me", "name": "www.oneal.daplie.me", "tld": "daplie.me", "sld": "oneal", "sub": "www"
, "type": "CNAME", "data": "oneal.daplie.me" }
, { "zone": "oneal.daplie.me", "name": "aj.oneal.daplie.me", "tld": "daplie.me", "sld": "oneal", "sub": "aj"
, "type": "NS", "data": "ns1.redirect-www.org" }
, { "zone": "oneal.daplie.me", "name": "aj.oneal.daplie.me", "tld": "daplie.me", "sld": "oneal", "sub": "aj"
, "type": "NS", "data": "ns2.redirect-www.org" }
// there can be a wildcard, to which a delegation is the exception
, { "zone": "oneal.daplie.me", "name": "*.oneal.daplie.me", "tld": "daplie.me", "sld": "oneal", "sub": "*"
, "type": "A", "address": "45.56.59.142", "aname": "leo.devices.oneal.daplie.me" }
// there can be an exception to the delegation
, { "zone": "oneal.daplie.me", "name": "exception.aj.oneal.daplie.me", "tld": "daplie.me", "sld": "oneal", "sub": "exception.aj"
, "type": "A", "address": "45.56.59.142", "aname": "leo.devices.oneal.daplie.me" }
//
// aj.oneal.daplie.me
//
, { "zone": "aj.oneal.daplie.me", "name": "aj.oneal.daplie.me", "tld": "oneal.daplie.me", "sld": "aj", "sub": ""
, "type": "A", "address": "45.56.59.142", "aname": "leo.devices.oneal.daplie.me" }
]
}
;