Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GoIp ¶
type GoIp struct { IpServiceUrl string // contains filtered or unexported fields }
func (*GoIp) GetIpLocation ¶ added in v1.2.88
func (*GoIp) QueryDbReaderCountryForZhName ¶
查询 IP相关信息,返回IP所属国家中文名称
func (*GoIp) QueryLocationInfoByIp ¶
func (g *GoIp) QueryLocationInfoByIp(ipStr string) (*IP2Locationrecord, error)
IP 相关信息
type IP2Locationrecord ¶
type IP2Locationrecord struct { Country_short string Country_long string Region string City string Isp string Latitude float32 Longitude float32 Domain string Zipcode string Timezone string Netspeed string Iddcode string Areacode string Weatherstationcode string Weatherstationname string Mcc string Mnc string Mobilebrand string Elevation float32 Usagetype string Addresstype string Category string District string Asn string As string }
type IpLocation ¶ added in v1.2.88
type IpLocation struct { IsoCode string `json:"iso_code"` //iso 编码 https://zh.m.wikipedia.org/zh/ISO_3166-1 Name string `json:"name"` Continent string `json:"continent"` //洲 ContinentCode string `json:"continent_code"` //洲编码 Isp string `json:"isp"` //isp }
----------------------------------------------------------------
Click to show internal directories.
Click to hide internal directories.