netex

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIpv4Validity

func CheckIpv4Validity(IPString string) bool

func CheckIpv6Validity

func CheckIpv6Validity(IPString string) bool

func CheckPingOk added in v0.0.7

func CheckPingOk(addr string, interval int, count int, timeout int, lossRateOk float64) (bool, error)

need to run as root interval and timout are in seconds

func DecodeToGBK added in v0.0.7

func DecodeToGBK(text string) (string, error)

func GetCityByIp

func GetCityByIp(ip string) string

func GetClientIP

func GetClientIP(r *http.Request) (ip string)

GetClientIP 获取用户ip

func GetDynamicPageHtmlContent added in v0.0.7

func GetDynamicPageHtmlContent(url string) (htmlContent string, err error)

func GetFirstAddressOf

func GetFirstAddressOf(name string) (string, error)

GetFirstAddressOf returns the first IPv4 address of the supplied interface name.

func GetInternalIP

func GetInternalIP() string

GetInternalIP get internal ip.

func GetLocalIP

func GetLocalIP() (string, error)

func GetMxrr

func GetMxrr(domain string) (isMx bool, mxs []*net.MX, err error)

GetMxrr Get MX records corresponding to a given Internet host name Returns TRUE if any records are found; returns FALSE if no records were found or if an error occurred

func GetOutboundIP

func GetOutboundIP() (string, error)

func HTTPBuildQuery

func HTTPBuildQuery(pairs map[string]string) string

HTTPBuildQuery Generates a URL-encoded query string from the associative map

func HostAddress

func HostAddress(host string, port int) string

func HostAddress2

func HostAddress2(host string, port string) string

func HostPort

func HostPort(addr string) (string, string, error)

func IP2long

func IP2long(ipAddr string) (uint32, error)

IP2long converts a string containing an (IPv4) Internet Protocol dotted address into a long integer

func IsPrivateIP

func IsPrivateIP(ipAddr string) bool

func IsRedirect added in v0.0.2

func IsRedirect(resp *http.Response) bool

func IsSameAddr

func IsSameAddr(a1, a2 net.Addr) bool

func Long2ip

func Long2ip(ipLong uint32) string

Long2ip converts an long integer address into a string in (IPv4) Internet standard dotted format

func ParseURL added in v0.0.2

func ParseURL(uri string) *url.URL

func WSHostAddress

func WSHostAddress(host string, port int, path string) string

func WSHostAddress2

func WSHostAddress2(host string, port string, path string) string

func WSSHostAddress

func WSSHostAddress(host string, port int, path string) string

func WSSHostAddress2

func WSSHostAddress2(host string, port string, path string) string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL