ipgeolocation

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URL = "https://api.ipgeolocation.io/ipgeo"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	APIKey  string `json:"api_key,omitempty"`
	Enabled bool   `json:"enabled,omitempty"`
}

type IPGeolocation

type IPGeolocation struct {
	APIKey string
}

func New

func New(apiKey string) *IPGeolocation

func (*IPGeolocation) GetLocation

func (i *IPGeolocation) GetLocation() (geocoder.Location, error)

type Response

type Response struct {
	IP        string `json:"ip"`
	Latitude  string `json:"latitude"`
	Longitude string `json:"longitude"`
}

https://ipgeolocation.io/documentation/ip-geolocation-api.html

Jump to

Keyboard shortcuts

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