X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/d5754b53e4f119674b9d8a0bdf40bf92f6007d12..58f4ce3bac23ceef3d84ab97144d1b4b50f27606:/lib/domain.dtl diff --git a/lib/domain.dtl b/lib/domain.dtl index 0ab7716..08606a6 100644 --- a/lib/domain.dtl +++ b/lib/domain.dtl @@ -8,6 +8,12 @@ extern type no_newlines; extern type ip; {{An IP address}} +extern type ipv6; +{{An IPv6 address}} + +extern type your_ip; +extern val your_ip_to_ip : your_ip -> ip; +{{An IP address that you're authorized to use; e.g., for an SSL web host}} extern type host; {{A hostname; that is, (more or less) an alphanumeric string}} @@ -18,17 +24,33 @@ extern type domain; extern type your_domain; {{A domain that you're allowed to configure}} +extern type your_domain_host; +{{Some host (as a fully-qualified domain name) in one of your domains}} + extern type node; {{The name of a server controlled by domtool}} +extern val ip_of_node : node -> ip; +{{Look up the IP address of a node.}} + +extern type user; +extern type group; +{{UNIX users and groups}} + extern type your_user; extern type your_group; {{UNIX users and groups that you're allowed to run as}} extern type your_path; -{{A filesystem path that you're allowed to use. +{{A filesystem path that you're allowed to write to. The set of permitted values is generated from a set of roots by closing it under the subdirectory relation.}} +extern val end_in_slash : your_path -> your_path; +{{Add a slash at the end of a path, if there isn't one already.}} + +extern type readable_path; +{{Like [your_path], but also includes some paths that everyone is allowed to + read.}} context Domain; {{Configuration directives specific to an Internet domain}} @@ -36,7 +58,7 @@ context Domain; extern type serial; {{Domain zone serial numbers}} extern val serialAuto : serial; -{{Whenever DNS data changes, choose a sensible serial number automatically.} +{{Whenever DNS data changes, choose a sensible serial number automatically.}} extern val serialConst : int -> serial; {{Use this particular serial number.}} @@ -44,20 +66,33 @@ extern type soa; {{DNS start-of-authority record}} extern val soa : domain -> serial -> int -> int -> int -> int -> soa; +val defaultSoa = soa "deleuze.hcoop.net" serialAuto 86400 1800 1209600 3600; + +extern type dns_node; +{{A node offering DNS services}} +extern val dns_node_to_node : dns_node -> node; + extern type master; {{Information on the master DNS server for a domain}} extern val externalMaster : ip -> master; {{A server not controlled by domtool will serve as master.}} -extern val internalMaster : node -> master; +extern val internalMaster : dns_node -> master; {{A server controlled by domtool will serve as master.}} extern type dnsKind; {{How should DNS for this domain be handled?}} -extern val useDns : soa -> master -> [node] -> dnsKind; +extern val useDns : soa -> master -> [dns_node] -> dnsKind; {{We do want DNS services for this domain. Specify the SOA record, information on the server in charge of zone data, and a list of slave servers.}} extern val noDns : dnsKind; {{No DNS services for this domain.}} -extern val domain : your_domain -> Domain => [Root] {DNS : dnsKind, TTL : int}; +extern val domain : your_domain -> Domain => [Root] {Aliases : [your_domain], DNS : dnsKind, TTL : int}; {{Configure a domain to which you have access rights.}} + +extern type mail_node; +{{A node offering SMTP services}} +extern val mail_node_to_node : mail_node -> node; + +extern val domainHost : host -> [Domain] {} => { Hostname : domain }; +{{Appends the current domain onto a host.}}