Add end_in_slash and use it to fix moinMoin; do extra reduction during evaluation
[hcoop/zz_old/domtool2-proto.git] / lib / domain.dtl
CommitLineData
51c32b45 1{{Configuring shared daemons with respect to a particular Internet domain name}}
2
697d1a52 3extern type no_spaces;
4{{Any string with no space characters}}
5
0279185b 6extern type no_newlines;
7{{Any string with no newline characters}}
8
85af7d3e 9extern type ip;
10{{An IP address}}
11
6645f04b 12extern type your_ip;
f4018a6e 13extern val your_ip_to_ip : your_ip -> ip;
6645f04b 14{{An IP address that you're authorized to use; e.g., for an SSL web host}}
15
85af7d3e 16extern type host;
17{{A hostname; that is, (more or less) an alphanumeric string}}
18
51c32b45 19extern type domain;
20{{An Internet domain name}}
21
4e8a3f2b 22extern type your_domain;
23{{A domain that you're allowed to configure}}
24
69d98465 25extern type your_domain_host;
26{{Some host (as a fully-qualified domain name) in one of your domains}}
27
668e333e 28extern type node;
29{{The name of a server controlled by domtool}}
30
ae175ff1 31extern val ip_of_node : node -> ip;
32{{Look up the IP address of a node.}}
33
00e4345d 34extern type user;
35extern type group;
36{{UNIX users and groups}}
37
d68ab27c 38extern type your_user;
39extern type your_group;
4e8a3f2b 40{{UNIX users and groups that you're allowed to run as}}
41
d68ab27c 42extern type your_path;
a57f3dfb 43{{A filesystem path that you're allowed to write to.
d68ab27c 44 The set of permitted values is generated from a set of roots by closing it
45 under the subdirectory relation.}}
61caeff8 46extern val end_in_slash : your_path -> your_path;
47{{Add a slash at the end of a path, if there isn't one already.}}
4e8a3f2b 48
a57f3dfb 49extern type readable_path;
50{{Like [your_path], but also includes some paths that everyone is allowed to
51 read.}}
52
51c32b45 53context Domain;
54{{Configuration directives specific to an Internet domain}}
55
85af7d3e 56extern type serial;
57{{Domain zone serial numbers}}
58extern val serialAuto : serial;
ce3174a5 59{{Whenever DNS data changes, choose a sensible serial number automatically.}}
85af7d3e 60extern val serialConst : int -> serial;
61{{Use this particular serial number.}}
62
63extern type soa;
64{{DNS start-of-authority record}}
65extern val soa : domain -> serial -> int -> int -> int -> int -> soa;
66
3408676a 67val defaultSoa = soa "deleuze.hcoop.net" serialAuto 172800 900 1209600 3600;
94a7e258 68
1bb29dea 69extern type dns_node;
70{{A node offering DNS services}}
71extern val dns_node_to_node : dns_node -> node;
72
668e333e 73extern type master;
74{{Information on the master DNS server for a domain}}
75extern val externalMaster : ip -> master;
76{{A server not controlled by domtool will serve as master.}}
1bb29dea 77extern val internalMaster : dns_node -> master;
668e333e 78{{A server controlled by domtool will serve as master.}}
79
85af7d3e 80extern type dnsKind;
81{{How should DNS for this domain be handled?}}
1bb29dea 82extern val useDns : soa -> master -> [dns_node] -> dnsKind;
668e333e 83{{We do want DNS services for this domain. Specify the SOA record, information
84 on the server in charge of zone data, and a list of slave servers.}}
85af7d3e 85extern val noDns : dnsKind;
668e333e 86{{No DNS services for this domain.}}
85af7d3e 87
97d03e40 88extern val domain : your_domain -> Domain => [Root] {Aliases : [your_domain], DNS : dnsKind, TTL : int};
51c32b45 89{{Configure a domain to which you have access rights.}}
695b8c37 90
91extern type mail_node;
92{{A node offering SMTP services}}
3901a942 93extern val mail_node_to_node : mail_node -> node;
94
95extern val domainHost : host -> [Domain] {} => { Hostname : domain };
96{{Appends the current domain onto a host.}}