ipgeo

package
v0.0.0-...-204a80d Latest Latest
Warning

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

Go to latest
Published: May 13, 2023 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IPInfoToken    string = ""
	AiWenToken     string = ""
	AiWenV6Token   string = ""
	IPDataToken    string = ""
	IPInsightToken string = ""
)

Functions

func AiwenTechScense

func AiwenTechScense(ip string) (string, error)

func HasLocalIP

func HasLocalIP(ip net.IP) bool

HasLocalIP 检测 IP 地址是否是内网地址 通过直接对比ip段范围效率更高

func HasLocalIPAddr

func HasLocalIPAddr(ip string) bool

Types

type IPGeoData

type IPGeoData struct {
	IP          string              `json:"ip"`
	Asnumber    string              `json:"asnumber"`
	Country     string              `json:"country"`
	CountryEN   string              `json:"country_en"`
	CountryCode string              `json:"country_code"`
	Prov        string              `json:"prov"`
	RegionEN    string              `json:"prov_en"`
	City        string              `json:"city"`
	CityEN      string              `json:"city_en"`
	District    string              `json:"district"`
	Owner       string              `json:"owner"`
	Isp         string              `json:"isp"`
	Domain      string              `json:"domain"`
	Whois       string              `json:"whois"`
	Prefix      string              `json:"prefix"`
	Lat         float64             `json:"lat"`
	Lng         float64             `json:"lng"`
	Router      map[string][]string `json:"router"`
	Source      string              `json:"source"`
}

func AiwenTech

func AiwenTech(ip string) (*IPGeoData, error)

func AiwenTechv6

func AiwenTechv6(ip string) (*IPGeoData, error)

func GetIPASNDomain

func GetIPASNDomain(ip string) *IPGeoData

func GetIPGeoData

func GetIPGeoData(ip string) *IPGeoData

func IPData

func IPData(ip string) (*IPGeoData, error)

func IPInfo

func IPInfo(ip string) (*IPGeoData, error)

func IPInfoTMP

func IPInfoTMP(ip string) (*IPGeoData, error)

func IPInsight

func IPInsight(ip string) (*IPGeoData, string, error)

type IpWhois

type IpWhois struct {
	IP           string
	Owner        string
	Inetnum      string
	Netname      string
	Country_code string
}

func AiwenIPWhois

func AiwenIPWhois(ip string) (*IpWhois, error)

Jump to

Keyboard shortcuts

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