From 88a2ee4783d15c74f735f26c48b621b5e848d334 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Fri, 9 Dec 2016 17:38:08 +0200 Subject: doc: describe functionality used in the dns-zone module --- aconf/model/net.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'aconf/model/net.lua') 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})) -- cgit v1.2.3