ipService

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package ipService 读取第三方的ip地址信息

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IpInfo

type IpInfo struct {
	Ip       string `json:"ip"`       // ip
	Country  string `json:"country"`  // 国家
	Province string `json:"province"` // 省份
	City     string `json:"city"`     // 城市
	Isp      string `json:"isp"`      // 运营商
	Score    string `json:"score"`    // 真人概率
}

func GetIpInfoCZ

func GetIpInfoCZ(ip string) (IpInfo, error)

GetIpInfoCZ 获取ip信息,数据来自纯真 数据来源网址 https://www.cz88.net/ @param ip 要查询的ip

func GetIpInfoCip

func GetIpInfoCip(ip string) (IpInfo, error)

GetIpInfoCip 获取ip信息,数据来自ip138 数据来源网址 http://www.cip.cc/ @param ip 要查询的ip

func RandomQuery

func RandomQuery(ip string) (IpInfo, error)

RandomQuery 随机查询ip的地址信息 @param ip 要查询的ip

Jump to

Keyboard shortcuts

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