Documentation ¶
Index ¶
- Constants
- func GetClientIP(r *http.Request) (ip string)
- func GetGPSByIpAmap(ip string) (data map[string]interface{}, err error)
- func GetLocalIp() (ips []string, err error)
- func GetPublicIP() (ip string, err error)
- func IsIPv4(ip string) (ok bool)
- func IsIPv6(ip string) (ok bool)
- func IsIpAddress(ip string) (ok bool)
Constants ¶
View Source
const (
// GET_PUBLIC_IP_URL 查询公网IP的URL
GET_PUBLIC_IP_URL = "http://myexternalip.com/raw"
)
View Source
const ( // TIME_OUT 第三方接口请求超时时间 TIME_OUT = 3 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func GetGPSByIpAmap ¶ added in v0.1.2
GetGPSByIpAmap *
- @Description: 获取IP对应得GPS坐标(内网地址则匹配当前地址所对应得公网地址)
- @param ip ip地址
- @return data
- @return err 错误信息
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.