summaryrefslogtreecommitdiffstats
path: root/aconf/model/net.lua
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2016-12-09 17:38:08 +0200
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2016-12-18 23:02:34 +0200
commit88a2ee4783d15c74f735f26c48b621b5e848d334 (patch)
treed93cdd85a385060861fea9d6b715e8e4594c6442 /aconf/model/net.lua
parentc248dca6eeaa6994fc3ab663f431238266417241 (diff)
downloadaconf-88a2ee4783d15c74f735f26c48b621b5e848d334.tar.bz2
aconf-88a2ee4783d15c74f735f26c48b621b5e848d334.tar.xz
doc: describe functionality used in the dns-zone module
Diffstat (limited to 'aconf/model/net.lua')
-rw-r--r--aconf/model/net.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/aconf/model/net.lua b/aconf/model/net.lua
index b48a57c..40ddd36 100644
--- a/aconf/model/net.lua
+++ b/aconf/model/net.lua
@@ -171,7 +171,7 @@ function M.IPv6Address:cidr2mask(cidr) return cidr end
--- IP address field, inherits @{String}. Accepts both IPv4 and IPv6
-- address values.
--- @fcons net.IPAddress
+-- @fclass net.IPAddress
M.IPAddress = class(Union)
function M.IPAddress:init(params)
@@ -184,6 +184,9 @@ function M.IPAddress:init(params)
end
+--- TCP or UDP port field, inherits @{Integer}. The value can be
+-- between 0 and 65535.
+-- @fclass net.Port
M.Port = class(fld.Integer)
function M.Port:validate(context, value)
@@ -195,7 +198,7 @@ end
local domain_pattern = '[A-Za-z%d%.%-]+%.[A-Za-z][A-Za-z]+'
--- domain name field, inherits @{String}.
--- @fcons net.DomainName
+-- @fclass net.DomainName
M.DomainName = class(String)
function M.DomainName:init(params)
super(self, M.DomainName):init(update(params, {pattern=domain_pattern}))