ipService

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2025 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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信息,数据来自纯真 *

func GetIpInfoCip

func GetIpInfoCip(ip string) (IpInfo, error)

GetIpInfoCip 获取ip信息,数据来自ip138 *

func RandomQuery

func RandomQuery(ip string) (IpInfo, error)

RandomQuery 随机查询ip的地址信息 *

  • @param ip 要查询的ip
  • @return IpInfo,error

Jump to

Keyboard shortcuts

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