Documentation
¶
Overview ¶
Package listing turns the entries of the published lists into the keys their snapshot rows are looked up by: a site's normalised host and path, an address, an E.164 phone number or a SIREN, normalised by the domain value objects. Lists that share entries, such as the AMF and ACPR blacklists, give them the same key, so a check can name both sources.
Index ¶
Constants ¶
const ( // ColumnKind is the kind of the key: "domain", "email", "phone" or // "siren". ColumnKind = "kind" // ColumnKey is the normalised host, address, number or SIREN the entry // is looked up by. ColumnKey = "key" // ColumnPath is the path and query of a site entry that targets one // page, "" when it targets the whole site or the key is not a site. ColumnPath = "path" // ColumnEntry is the value as the publisher lists it. ColumnEntry = "entry" )
Columns every snapshot row of a listing starts with.
const ( // ColumnCategories are the publisher's categories, separated by "|". ColumnCategories = "categories" // ColumnListedOn is the listing date, AAAA-MM-JJ. ColumnListedOn = "listed_on" )
Columns a blacklist row adds to the common ones, for every blacklist.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Key ¶
type Key struct {
Kind string // a domain.Kind name: "domain", "email", "phone" or "siren"
Value string // normalised by the domain value object
Path string // path and query of a site entry that targets one page
Entry string // the value as the publisher lists it
}
Key is what an entry is looked up by: the first four columns of every snapshot row.
func Classify ¶
Classify reads one entry of a blacklist: an address, a site, or a free-text name, which may name a natural person and is not ok.
func Email ¶
Email reads an address. A final dot, as in "prénom.nom@lgt-bp.com.", is a typo of the lists.