Versions in this module Expand all Collapse all v0 v0.1.0 May 23, 2020 Changes in this version + var ErrInvalidIP = errors.New("httpbl: ip is not a valid IPv4 address") + var ErrInvalidKey = errors.New("httpbl: malformed access key") + var ErrInvalidResponse = errors.New("httpbl: dns response does not match expected format") + var ErrMissingAccessKey = errors.New("httpbl: missing access key") + func ValidateAccessKey(key string) error + type Context struct + AccessKey string + Resolver *net.Resolver + func (c *Context) Lookup(ctx context.Context, ip net.IP) (*Result, error) + type KnownSearchEngine uint8 + const SEAltaVista + const SEAsk + const SEBaidu + const SECuil + const SEExcite + const SEGoogle + const SEInfoSeek + const SELooksmart + const SELycos + const SEMSN + const SEMiscellaneous + const SEUndocumented + const SEYahoo + func (se KnownSearchEngine) String() string + type Result struct + Days uint8 + SearchEngine KnownSearchEngine + Threat uint8 + Type ResultType + func (r *Result) CheckThreatLevel(min uint8) bool + func (r *Result) SeenWithinDays(max uint8) bool + type ResultType uint8 + const CommentSpammer + const Harvester + const SearchEngine + const Suspicious + func (t ResultType) CommentSpammer() bool + func (t ResultType) Harvester() bool + func (t ResultType) SearchEngine() bool + func (t ResultType) String() string + func (t ResultType) Suspicious() bool