geo

package
v1.11.5 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type City

type City struct {
	City struct {
		Names map[string]string `maxminddb:"names"`
	} `maxminddb:"city"`
	Country struct {
		IsoCode string `maxminddb:"iso_code"`
	} `maxminddb:"country"`
	Subdivisions []struct {
		Names map[string]string `maxminddb:"names"`
	} `maxminddb:"subdivisions"`
}

type Geo

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

func New added in v1.8.0

func New(lo *location.Location, dir string) (*Geo, error)

func (*Geo) Close

func (g *Geo) Close() error

func (*Geo) Rand added in v1.8.0

func (g *Geo) Rand(size int) []string

func (*Geo) UpdateCity added in v1.8.0

func (g *Geo) UpdateCity(ip net.IP, m *models.Model) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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