go_grab_ip

package module
v0.0.0-...-5d6065e Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPData

type IPData struct {
	Status      string  `json:"status"`
	Country     string  `json:"country"`
	CountryCode string  `json:"countryCode"`
	Region      string  `json:"region"`
	RegionName  string  `json:"region_name"`
	City        string  `json:"city"`
	Zip         string  `json:"zip"` //in some places it's a string
	Lat         float64 `json:"lat"`
	Lon         float64 `json:"lon"`
	Timezone    string  `json:"timezone"`
	Isp         string  `json:"isp"`
	Org         string  `json:"org"`
	Org2        string  `json:"as"`
	Ip          string  `json:"query"`
}

ip-api.com query

func AwaitIPData

func AwaitIPData() IPData

WARNING! This will run until the user has internet to grab it's ip from

func GetIPData

func GetIPData() (IPData, error)

WARNING! This doesn't guarantee that the user doesn't use any VPN

Jump to

Keyboard shortcuts

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