qqwry

package
v0.0.0-...-b1c4608 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IndexLen 索引长度
	IndexLen = 7
	// 用于二分查找折半算中间值
	IndexLenTwo = IndexLen << 1
	// RedirectMode1 国家的类型, 指向另一个指向
	RedirectMode1 = 0x01
	// RedirectMode2 国家的类型, 指向另一个指向
	RedirectMode2 = 0x02
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IPinfo

type IPinfo struct {
	Loc   string // IP 所在的地址
	Owner string // IP 的所有者
}

定义信息结构

type QQwry

type QQwry struct {
	IPNum   int64  // ip 的个数
	DataLen int64  // 数据的长度
	Offset  int64  // 偏移量
	Data    []byte // IP的数据
}

QQwry 纯真ip库

var IpData QQwry

func (*QQwry) FeachAll

func (q *QQwry) FeachAll() <-chan ResultQQwry

把所有的 IP 都输出来

func (*QQwry) Find

func (q *QQwry) Find(ip string) (res ResultQQwry)

Find ip地址查询对应归属地信息

type ResultQQwry

type ResultQQwry struct {
	IP string
	IPinfo
}

IP 归属地信息

Jump to

Keyboard shortcuts

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