Documentation
¶
Overview ¶
Package acpr holds the connector of the blacklist the Autorité de contrôle prudentiel et de résolution and the AMF publish through Assurance Banque Épargne Info Service (docs/sources.md). Its reuse licence is still to be obtained (issue #30): the source stays disabled by default until then.
Each snapshot row is one site or address, keyed as the AMF blacklist keys it, so an entry both lists hold can be reported with both sources. Free-text names and the Dénomination column, which may name natural persons, are left out.
Index ¶
Constants ¶
const BlacklistSource domain.Source = "ACPR"
BlacklistSource is the name of the ACPR blacklist, as shown to users.
const BlacklistURL = "https://www.abe-infoservice.fr/fr/abeis-liste-noire.csv"
BlacklistURL is the published file of the blacklist.
Variables ¶
var ErrFormat = errors.New("unexpected ACPR file format")
ErrFormat means the file is not laid out as docs/sources.md records it. Errors never quote a value of the file: it may hold an address.
Functions ¶
func Hosts ¶
func Hosts() []string
Hosts returns the hosts a Fetcher reaches, for the HTTP client allowlist.
func ParseBlacklist ¶
ParseBlacklist reads the published CSV file into a snapshot, one row per site or address, with the categories separated by "|" and the date as AAAA-MM-JJ, as in the AMF blacklist snapshot. Free-text names and the Dénomination column are left out. A file that departs from the recorded format is rejected with ErrFormat rather than half read.
Types ¶
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
Fetcher downloads and parses the blacklist. It implements app.SourceFetcher.
func NewBlacklist ¶
NewBlacklist returns the Fetcher of the blacklist, which downloads the file at fileURL, BlacklistURL in production, through client.
func (*Fetcher) Spec ¶
func (f *Fetcher) Spec() domain.SnapshotSpec
Spec declares the snapshot columns and the least number of rows.