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 CIDRMatcher ¶
CIDRMatcher creates a Matcher for a specific CIDR notation IP address.
func DomainMatcher ¶
DomainMatcher creates a Matcher for a specific domain pattern, the pattern can be a plain domain such as 'example.com', a wildcard such as '*.exmaple.com' or a special wildcard '.example.com'.
func NewMatcher ¶
NewMatcher creates a Matcher for the given pattern. The acutal Matcher depends on the pattern: IP Matcher if pattern is a valid IP address. CIDR Matcher if pattern is a valid CIDR address. Domain Matcher if both of the above are not.
Click to show internal directories.
Click to hide internal directories.