Documentation ¶
Overview ¶
Package check defines how to check an IP address. It provides types and functions that are useful when writing checks.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultHttpClient = HttpClient{/* contains filtered or unexported fields */}
DefaultHttpClient is reused by checks that make HTTP requests.
Functions ¶
func GetConfigValue ¶
GetConfigValue tries to get value for key first from an environment variable then from a configuration file at $HOME/.checkip.yaml.
func UpdateFile ¶
UpdateFile updates file from url if the file is older than a week. If file does not exist it downloads and creates it. compressFmt is the compression format of the file to download; gz or tgz. Empty string means no compression.
Types ¶
type EmptyInfo ¶ added in v0.10.1
type EmptyInfo struct { }
EmptyInfo is returned by checks that don't provide generic information about an IP address.
func (EmptyInfo) JsonString ¶ added in v0.10.1
type Error ¶ added in v0.10.1
type Error struct { ErrString string `json:"error"` // contains filtered or unexported fields }
Error is an error returned by a check.
type HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}