geo

package
v0.0.68 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func With

func With(ctx context.Context, g *Geo) context.Context

Types

type City

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

type Geo

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

func Get

func Get(ctx context.Context) *Geo

func Open

func Open(path string) *Geo

func (*Geo) Close

func (g *Geo) Close() error

func (*Geo) Get

func (g *Geo) Get(ip net.IP) Info

type Info

type Info struct {
	City    string
	Country string
	Region  string
}

type Record

type Record struct {
}

Jump to

Keyboard shortcuts

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