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