Documentation
¶
Overview ¶
package designed to query api.whatismyip.com for public IP address information. this package contains the structs defining the JSON responses expected and the objects that will utilize them to pull down information.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PublicIPGrabber ¶
type PublicIPGrabber struct {
PublicIP PublicIPInfo
}
structure defining a PublicIPGrabber object. this will have associated functions to query the site api.whatismyip.com and grab the public IP info.
func (*PublicIPGrabber) GetMyIPInformation ¶
func (ipg *PublicIPGrabber) GetMyIPInformation() (err error)
function designed to query api.whatismyip.com and pull down the public IP address information for the machine executing the program.
type PublicIPInfo ¶
type PublicIPInfo struct { // public ip address Ip string `json:"ip"` // geolocation of the server hosting the ip Location string `json:"geo"` // provider hosting the IP address Provider string `json:"isp"` }
structure holding public ip information. this will be used in the PublicIPGrabber object and associated request to api.whatismyip.com.