ipgeo

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var IPPools = IPPool{
	// contains filtered or unexported fields
}

Functions

func LtdCodeToCountryOrAreaName

func LtdCodeToCountryOrAreaName(Code string) string

Types

type IPGeoData

type IPGeoData struct {
	IP        string              `json:"ip"`
	Asnumber  string              `json:"asnumber"`
	Country   string              `json:"country"`
	CountryEn string              `json:"country_en"`
	Prov      string              `json:"prov"`
	ProvEn    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"`
	Lat       float64             `json:"lat"`
	Lng       float64             `json:"lng"`
	Prefix    string              `json:"prefix"`
	Router    map[string][]string `json:"router"`
	Source    string              `json:"source"`
}

func Chunzhen

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

func DN42

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

func Filter

func Filter(ip string) (*IPGeoData, bool)

Filter 被选到的返回 geodata, true 否则返回 nil, false

func IP2Region

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

func IPApiCom

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

func IPInSight

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

func IPInfo

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

func IPInfoLocal

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

func IPSB

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

func LeoIP

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

type IPPool

type IPPool struct {
	// contains filtered or unexported fields
}

IPPool IP 查询池 map - ip - ip channel

type Source

type Source = func(ip string) (*IPGeoData, error)

func GetSource

func GetSource(s string) Source

Jump to

Keyboard shortcuts

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