maxmind

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelASN = iota
	LevelCity
	LevelCityASN
	LevelCityLoc
	LevelCityLocASN
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Geo

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

Geo represents Maxmind

func New

func New() *Geo

New constructs new Maxmind Geo

func (*Geo) Get

func (g *Geo) Get(ipStr string) map[string]string

Get returns Geo information

func (*Geo) Init

func (g *Geo) Init(logger *zap.Logger, cfg map[string]string)

Init initializes MaxMind database

Jump to

Keyboard shortcuts

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