Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Matcher ¶
Matcher is a generic pattern matcher, it gives the match result of the given pattern for specific v.
func AddrMatcher ¶
AddrMatcher creates a Matcher with a list of HOST:PORT addresses. the host can be an IP (e.g. 192.168.1.1) address, a plain domain such as 'example.com', or a special pattern '.example.com' that matches 'example.com' and any subdomain 'abc.example.com', 'def.abc.example.com' etc. The PORT can be a single port number or port range MIN-MAX(e.g. 0-65535).
func CIDRMatcher ¶
CIDRMatcher creates a Matcher for a list of CIDR notation IP addresses.
func DomainMatcher ¶
DomainMatcher creates a Matcher for a list of domains, the domain should be a plain domain such as 'example.com', or a special pattern '.example.com' that matches 'example.com' and any subdomain 'abc.example.com', 'def.abc.example.com' etc.
func WildcardMatcher ¶
WildcardMatcher creates a Matcher for a specific wildcard domain pattern, the pattern can be a wildcard such as '*.exmaple.com', '*.example.com:80', or '*.example.com:0-65535'