Documentation
¶
Index ¶
- func CIDRtoIPRange(cidr string) (string, error)
- func GetPTRs(ip string) ([]string, error)
- func IPRangeToCIDR(ipRange string) ([]string, error)
- func IPsToCIDR(IPs []string) (cidrs []string, err error)
- func IPsToRange(IPs []string) ([]string, error)
- func IsCIDR(str string) bool
- func IsIP(str string) bool
- func IsIPInCIDR(ip string, cidr string) bool
- func IsIPInRange(ip string, ipRange string) bool
- func IsIPRange(str string) bool
- func IsIPv4(ip string) bool
- func IsIPv6(ip string) bool
- func IsPrivateIP(ipStr string) bool
- func IsPublicIP(ip string) bool
- func IsURLIP(str string) bool
- func IsValidCIDR(cidr string) bool
- func IsValidIP(ip string) bool
- func IsValidIPRange(ipRange string) bool
- func IsValidNetworkInput(str string) bool
- func ParseCIDR(cidr string) ([]net.IP, error)
- func ParseIPRange(ipRange string) ([]net.IP, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CIDRtoIPRange ¶
CIDRtoIPRange converts a CIDR block to an IP range.
func IPRangeToCIDR ¶
IPRangeToCIDR converts an IP range to a slice of CIDR blocks.
func IPsToRange ¶
IPsToRange takes a slice of IP strings and returns a slice of IP ranges.
func IsIPInCIDR ¶
IsIPInCIDR checks if the provided IP address is within the provided CIDR.
func IsIPInRange ¶
IsIPInRange checks if the provided IP address is within the provided IP range.
func IsPrivateIP ¶
IsPrivateIP checks if the given IP is a private address.
func IsPublicIP ¶
IsPublicIP checks if the provided IP address is a public IP address.
func IsValidCIDR ¶
IsValidCIDR checks if the provided CIDR is valid.
func IsValidIPRange ¶
IsValidIPRange checks if the provided IP range is valid.
func IsValidNetworkInput ¶
IsValidNetworkInput checks if the provided string is a valid IP address, CIDR or IP range.
Types ¶
This section is empty.