geoip

package
v0.0.0-...-ddfd2c2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	Country   string
	Province  string
	City      string
	District  string
	ISP       string
	Longitude float64
	Latitude  float64
}

func AMapLookupV3

func AMapLookupV3(ip string, webkey string) (*Info, error)

通过高德 IP 定位 API 接口查询 IP 对应的地理位置

func AMapLookupV5

func AMapLookupV5(ip string, ipv4 bool, webkey string) (*Info, error)

通过高德 IP 定位 API 接口查询 IP 对应的地理位置

func Lookup

func Lookup(ip string) (*Info, error)

通过 IP 查询地理位置

func TencentLookup

func TencentLookup(ip string, webkey string) (*Info, error)

通过腾讯 IP 定位 API 接口查询 IP 对应的地理位置

Jump to

Keyboard shortcuts

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