maxmind

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PositiveTTL is the positive ttl for search queries
	PositiveTTL = 30 * time.Minute
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.0.6

type Client struct {
	IPCount int
	// contains filtered or unexported fields
}

Client for Maxmind

func NewClient added in v0.0.6

func NewClient(ctx context.Context, uri string) (*Client, error)

NewClient creates a new maxmind client

func (*Client) Close added in v0.0.6

func (c *Client) Close() error

Close the reader

func (*Client) Get added in v0.0.6

func (c *Client) Get(ip net.IP) (*geoip2.City, error)

Get city by id

Jump to

Keyboard shortcuts

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