Documentation ¶
Overview ¶
Package toolpageorg provides an interface to the en.toolpage.org web service.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var IOReadAll = io.ReadAll
IOReadAll is a copy of io.ReadAll function to ease mock it's behavior during test.
View Source
var LogInfo = info.Log
LogInfo is a copy of info.Log function to ease mock it's behavior during test.
View Source
var NewDocument = goquery.NewDocumentFromReader
NewDocument is a copy of goquery.NewDocumentFromReader function to ease mock it's behavior during test.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
EndpointURL string
}
Client holds information to request en.toolpage.org's URL.
func New ¶
func New() *Client
New returns a new Client for the en.toolpage.org API with default values.
type Response ¶
type Response struct { Provider string `json:"provider"` IP string `json:"ip"` Hostname string `json:"hostname,omitempty"` IPVersion string `json:"ipVersion,omitempty"` RemotePort string `json:"remotePort,omitempty"` }
Response is the structure of JSON from the API response of en.toolpage.org.
func GetResponse ¶
GetResponse returns the Response object parsed from the en.toolpage.org's content body.
Click to show internal directories.
Click to hide internal directories.