mmdb

package
v0.0.0-...-2cbf347 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDownloadUrl

func BuildDownloadUrl(licenseKey, editionID string) string

func GetBuildTime

func GetBuildTime(db *maxminddb.Reader) time.Time

func LookupGeo

func LookupGeo(db *maxminddb.Reader, ipStr string) (*proxy.GeoInfo, error)

func OpenLocal

func OpenLocal(directoryPath, editionID string) (*maxminddb.Reader, error)

Types

type MaxMindClient

type MaxMindClient struct {
	HttpClient *http.Client
	Verbose    bool
	// contains filtered or unexported fields
}

func NewDownloader

func NewDownloader(licenseKey string, directoryPath string) *MaxMindClient

func (*MaxMindClient) GetLastModified

func (mm *MaxMindClient) GetLastModified(editionID string) (time.Time, error)

func (*MaxMindClient) IsUpToDate

func (mm *MaxMindClient) IsUpToDate(db *maxminddb.Reader) (bool, error)

func (*MaxMindClient) Latest

func (mm *MaxMindClient) Latest(editionID string) (*maxminddb.Reader, error)

Jump to

Keyboard shortcuts

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