Documentation ¶
Overview ¶
Package parse contains functions that can be used in the setup code for plugins.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoNameservers = errors.New("no nameservers found")
ErrNoNameservers is returned by HostPortOrFile if no servers can be parsed.
Functions ¶
func HostPort ¶ added in v1.2.3
HostPort will check if the host part is a valid IP address, if the IP address is valid, but no port is found, defaultPort is added.
func HostPortOrFile ¶ added in v1.2.3
HostPortOrFile parses the strings in s, each string can either be a address, [scheme://]address:port or a filename. The address part is checked and in case of filename a resolv.conf like file is (assumed) and parsed and the nameservers found are returned.
func TransferIn ¶ added in v1.8.0
func TransferIn(c *caddy.Controller) (froms []string, err error)
TransferIn parses transfer statements: 'transfer from [address...]'.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.