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