feed

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package feed geolocation provides a simple function to get the geolocation of an IP address.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Geolocation

type Geolocation struct {
	IP          string  `json:"ip"`
	CountryCode string  `json:"country_code"`
	CountryName string  `json:"country_name"`
	RegionCode  string  `json:"region_code"`
	RegionName  string  `json:"region_name"`
	City        string  `json:"city"`
	ZipCode     string  `json:"zip_code"`
	TimeZone    string  `json:"time_zone"`
	Latitude    float64 `json:"latitude"`
	Longitude   float64 `json:"longitude"`
	MetroCode   int     `json:"metro_code"`
}

Geolocation is the IP geolocation service.

func GetGeolocation

func GetGeolocation(ip string) (*Geolocation, error)

GetGeolocation returns geolocation data using IP address.

Jump to

Keyboard shortcuts

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