ip2region

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2022 License: Apache-2.0, MIT Imports: 3 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ip2Region

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

func New

func New(path string) (*Ip2Region, error)

func (*Ip2Region) Close

func (a *Ip2Region) Close() error

func (*Ip2Region) DBBuff

func (a *Ip2Region) DBBuff() []byte

func (*Ip2Region) MemorySearch

func (a *Ip2Region) MemorySearch(ipStr string) (ipInfo IpInfo, err error)

func (*Ip2Region) Reload

func (a *Ip2Region) Reload(newPath ...string) error

type IpInfo

type IpInfo struct {
	Country  string
	Region   string
	Province string
	City     string
	ISP      string
}

func (IpInfo) String

func (ip IpInfo) String() string

Jump to

Keyboard shortcuts

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