Documentation
¶
Overview ¶
Package ipcheck provides a client for detecting the caller's public IP address.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrStatus = errors.New("status code error")
ErrStatus represents a non success status code error.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client fetches the caller's public IP address from Nine's IP check endpoint.
type Option ¶
type Option func(*Client)
Option is a function that configures a Client.
func WithHTTPClient ¶
WithHTTPClient configures the HTTP client to use.
func WithUserAgent ¶
WithUserAgent configures the User-Agent header to use.
Click to show internal directories.
Click to hide internal directories.