geoip

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.0.11

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

Client can look up geography information for IP addresses.

func NewClient added in v0.0.11

func NewClient() *Client

NewClient creates a new Client.

func (*Client) GetGeoFromIP added in v0.0.11

func (c *Client) GetGeoFromIP(ip string) *GeoDetails

GetGeoFromIP returns geo details associated with an IP address if we have previously fetched it.

type GeoDetails

type GeoDetails struct {
	CountryCode string `json:"countryCode"`
	RegionName  string `json:"regionName"`
	TimeZone    string `json:"timeZone"`
}

GeoDetails stores details about a location.

Jump to

Keyboard shortcuts

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