sdk

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RedirectMode1 重定向模式1
	// 表示国家记录和地区记录都被重定向
	RedirectMode1 = 0x01

	// RedirectMode2 重定向模式2
	// 表示国家记录或地区记录被重定向
	RedirectMode2 = 0x02
)

Variables

This section is empty.

Functions

func Bytes3Uint32

func Bytes3Uint32(b []byte) uint32

Bytes3Uint32 converts a 3-byte slice to a uint32 value.

Types

type Reader

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

Reader represents the QQWry database reader.

func NewReader

func NewReader(filePath string) (*Reader, error)

NewReader initializes a new QQWry instance given the file path.

func (*Reader) Find

func (q *Reader) Find(ip net.IP) (*ipnet.Range, string, string, error)

Find locates the IP in the QQWry database and returns its range, country, and area.

Jump to

Keyboard shortcuts

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