maxmind

package
v0.0.0-...-5b56a75 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DBName     string `toml:"db-name,commented"`
	AccountID  int    `toml:"account-id,commented"`
	LicenseKey string `toml:"license-key,commented"`
	// contains filtered or unexported fields
}

Config is ...

func DB

func DB(dbPath string, cfg Config) *Config

DB is ...

func (*Config) Check

func (cfg *Config) Check() bool

Check is ...

func (*Config) Download

func (cfg *Config) Download() error

Download is ...

func (*Config) GetCountryCode

func (cfg *Config) GetCountryCode(ip string) (string, error)

GetCountryCode is ...

type CountryRecord

type CountryRecord struct {
	Country struct {
		ISOCode string `maxminddb:"iso_code"`
	} `maxminddb:"country"`
}

CountryRecord is ...

Jump to

Keyboard shortcuts

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