Add read-only path type
[hcoop/domtool2.git] / lib / domain.dtl
1 {{Configuring shared daemons with respect to a particular Internet domain name}}
2
3 extern type no_spaces;
4 {{Any string with no space characters}}
5
6 extern type no_newlines;
7 {{Any string with no newline characters}}
8
9 extern type ip;
10 {{An IP address}}
11
12 extern type host;
13 {{A hostname; that is, (more or less) an alphanumeric string}}
14
15 extern type domain;
16 {{An Internet domain name}}
17
18 extern type your_domain;
19 {{A domain that you're allowed to configure}}
20
21 extern type your_domain_host;
22 {{Some host (as a fully-qualified domain name) in one of your domains}}
23
24 extern type node;
25 {{The name of a server controlled by domtool}}
26
27 extern val ip_of_node : node -> ip;
28 {{Look up the IP address of a node.}}
29
30 extern type user;
31 extern type group;
32 {{UNIX users and groups}}
33
34 extern type your_user;
35 extern type your_group;
36 {{UNIX users and groups that you're allowed to run as}}
37
38 extern type your_path;
39 {{A filesystem path that you're allowed to write to.
40 The set of permitted values is generated from a set of roots by closing it
41 under the subdirectory relation.}}
42
43 extern type readable_path;
44 {{Like [your_path], but also includes some paths that everyone is allowed to
45 read.}}
46
47 context Domain;
48 {{Configuration directives specific to an Internet domain}}
49
50 extern type serial;
51 {{Domain zone serial numbers}}
52 extern val serialAuto : serial;
53 {{Whenever DNS data changes, choose a sensible serial number automatically.}}
54 extern val serialConst : int -> serial;
55 {{Use this particular serial number.}}
56
57 extern type soa;
58 {{DNS start-of-authority record}}
59 extern val soa : domain -> serial -> int -> int -> int -> int -> soa;
60
61 val defaultSoa = soa "deleuze.hcoop.net" serialAuto 172800 900 1209600 3600;
62
63 extern type dns_node;
64 {{A node offering DNS services}}
65 extern val dns_node_to_node : dns_node -> node;
66
67 extern type master;
68 {{Information on the master DNS server for a domain}}
69 extern val externalMaster : ip -> master;
70 {{A server not controlled by domtool will serve as master.}}
71 extern val internalMaster : dns_node -> master;
72 {{A server controlled by domtool will serve as master.}}
73
74 extern type dnsKind;
75 {{How should DNS for this domain be handled?}}
76 extern val useDns : soa -> master -> [dns_node] -> dnsKind;
77 {{We do want DNS services for this domain. Specify the SOA record, information
78 on the server in charge of zone data, and a list of slave servers.}}
79 extern val noDns : dnsKind;
80 {{No DNS services for this domain.}}
81
82 extern val domain : your_domain -> Domain => [Root] {Aliases : [your_domain], DNS : dnsKind, TTL : int};
83 {{Configure a domain to which you have access rights.}}
84
85 extern type mail_node;
86 {{A node offering SMTP services}}
87 extern val mail_node_to_node : mail_node -> node;