Documentation ¶
Index ¶
- Constants
- func EffectiveTLDPlusOne(u *URL) (string, error)
- func FPByte256(u *URL, kind int) (key []byte, ok bool)
- func FPHex256(u *URL, kind int) (key string, ok bool)
- func FPHex64(u *URL, kind int) (key string, ok bool)
- func FPMByte256(u *URL, kind int) (fp struct{ ... })
- func FPMHex256(u *URL, kind int) (fp struct{ ... })
- func FPMHex64(u *URL) (fp struct{ ... })
- func FPMUint64(u *URL) (fp struct{ ... })
- func FPUint64(u *URL, kind int) (key uint64, ok bool)
- func HasLabel(u *URL) bool
- func HasPage(u *URL) bool
- func HasPath(u *URL) bool
- func HasPort(u *URL) bool
- func HasWWW(u *URL) bool
- func IsPrivate(ip interface{}) (ok bool)
- func NoLabel(u *URL)
- func NoPage(u *URL)
- func NoPath(u *URL)
- func NoPort(u *URL)
- func NoWWW(u *URL)
- func Parser(r io.Reader) func(u *URL) bool
- func Segmentizer(u *URL) (segment struct{ ... })
- type URL
Constants ¶
View Source
const ( Apex = iota Host Full FullNoPage )
hash generator kind defination
Variables ¶
This section is empty.
Functions ¶
func EffectiveTLDPlusOne ¶
EffectiveTLDPlusOne is a wrapper around public suffix version that will convert the u.Host to the eTLD+1 version
func FPMByte256 ¶
FPMByte256 is a multiform sha256 fingerprint generator utility
func IsPrivate ¶
func IsPrivate(ip interface{}) (ok bool)
IsPrivate vefifies that an ipv4/6 representation is not in a reserved range; supports url.URL, net.IP, and string types
func NoLabel ¶
func NoLabel(u *URL)
NoLabel removes any label from u.Host when present convering to apex
func Segmentizer ¶
Segmentizer parses the host into the apex and labels
Types ¶
type URL ¶
type URL struct {
Host, Port, Path, Page string
IP, IDNA bool
// contains filtered or unexported fields
}
URL parse and validate url with type detection flags for IP|IDNA
func (*URL) NoIDNA ¶
func (u *URL) NoIDNA()
NoIDNA flag toggle, turn off INDA transcoding; default:on
Click to show internal directories.
Click to hide internal directories.