Documentation ¶
Overview ¶
Package check checks an IP address using various public services. An IP address is checked by running one or more Checkers. There are two kinds of Checkers. An InfoChecker just gathers some useful information about the IP address. A SecChecker says whether the IP address is considered malicious or not.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultHttpClient = HttpClient{/* contains filtered or unexported fields */}
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 HttpClient ¶
type HttpClient struct {
// contains filtered or unexported fields
}
type Result ¶
type Result struct { CheckName string CheckType Type IsIPaddrMalicious bool Data Data Error *ResultError }
type ResultError ¶
type ResultError struct {
// contains filtered or unexported fields
}
func NewResultError ¶
func NewResultError(err error) *ResultError
func (*ResultError) Error ¶
func (e *ResultError) Error() string
Click to show internal directories.
Click to hide internal directories.