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