Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPInfo ¶
type IPInfo struct {
IP string `json:"ip"`
Type string `json:"type"`
Location Location `json:"location"`
}
IPInfo represents information about an IP address
type IPInfoError ¶
type IPInfoError struct {
IP string `json:"ip"`
Type string `json:"type"`
ErrorMessage string `json:"errorMessage"`
}
IPInfoError represents an error response for IP information
type IPInfosResponse ¶
type IPInfosResponse struct {
Data []interface{} `json:"data"`
}
IPInfosResponse represents the response for bulk IP info requests
type Location ¶
type Location struct {
Country string `json:"country"`
Region string `json:"region"`
City string `json:"city"`
Lat float64 `json:"lat"`
Lng float64 `json:"lng"`
PostalCode string `json:"postalCode"`
Timezone string `json:"timezone"`
GeonameID int `json:"geonameId"`
}
Location represents the geographic location information
type NetInfo ¶
type NetInfo struct {
// contains filtered or unexported fields
}
NetInfo is the client for geo information services
func (*NetInfo) GetIPInfos ¶
GetIPInfos fetches GeoIP information for multiple IP addresses
func (*NetInfo) SetErrorHandler ¶
SetErrorHandler sets a custom error handler function
type Option ¶
type Option func(*Options)
Option is a functional option for configuring the NetInfo client
func WithBaseURI ¶
WithBaseURI sets the base URI for the NetInfo service
Click to show internal directories.
Click to hide internal directories.