geoip

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Copyright (c) 2025 Tobias Schäfer. All rights reserved. Licensed under the MIT License, see LICENSE file in the project root for details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GeoIP

type GeoIP struct {
	Reader   *geoip2.Reader
	Database string
}

func NewGeoIP added in v1.0.0

func NewGeoIP(database string) (*GeoIP, error)

func (*GeoIP) Close added in v1.0.0

func (g *GeoIP) Close() error

func (*GeoIP) Location added in v1.0.0

func (g *GeoIP) Location(ip netip.Addr) *Location

type Location

type Location struct {
	Country string
	City    string
	Lat     float64
	Lon     float64
}

Jump to

Keyboard shortcuts

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