geoip

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeoIP

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

GeoIP2

func NewGeoIP

func NewGeoIP(filePath string) (*GeoIP, error)

new geoip from database file

func (GeoIP) Find

func (g GeoIP) Find(query string, params ...string) (result fmt.Stringer, err error)

func (GeoIP) Name added in v0.8.0

func (db GeoIP) Name() string

type Result added in v0.3.1

type Result struct {
	Country     string `json:"country"`
	CountryCode string `json:"country_code"`
	Area        string `json:"area"`
}

func (Result) String added in v0.3.1

func (r Result) String() string

Jump to

Keyboard shortcuts

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