modulepackage
1.3.0
Repository: https://github.com/nsone/maxminddb-golang.git
Documentation: pkg.go.dev
# README
MaxMind DB Reader for Go
This is a Go reader for the MaxMind DB format. Although this can be used to read GeoLite2 and GeoIP2 databases, geoip2 provides a higher-level API for doing so.
This is not an official MaxMind API.
Installation
go get github.com/oschwald/maxminddb-golang
Usage
See GoDoc for documentation and examples.
Examples
See GoDoc or
example_test.go
for examples.
Contributing
Contributions welcome! Please fork the repository and open a pull request with your changes.
License
This is free software, licensed under the ISC License.
# Constants
NotFound is returned by LookupOffset when a matched root record offset cannot be found.
# Structs
InvalidDatabaseError is returned when the database contains invalid data and cannot be parsed.
Metadata holds the metadata decoded from the MaxMind DB file.
Networks represents a set of subnets that we are iterating over.
Reader holds the data corresponding to the MaxMind DB file.
UnmarshalTypeError is returned when the value in the database cannot be assigned to the specified data type.