internal/

directory
v0.43.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: AGPL-3.0

Directories

Path Synopsis
Package adapter groups the implementations of the app ports: upstream sources, on-demand registries, reference lists shipped with the binary, storage, and the inbound HTTP and MCP servers (ADR 0002).
Package adapter groups the implementations of the app ports: upstream sources, on-demand registries, reference lists shipped with the binary, storage, and the inbound HTTP and MCP servers (ADR 0002).
alert
Package alert tells the operator that a source could not be synced or reloaded: an error line in the log, and a JSON POST to a webhook when one is configured.
Package alert tells the operator that a source could not be synced or reloaded: an error line in the log, and a JSON POST to a webhook when one is configured.
corpus
Package corpus reads the labelled evaluation corpus of testdata/corpus: scam.csv, inputs an authority blacklisted, and legit.csv, inputs of verified legitimate entities.
Package corpus reads the labelled evaluation corpus of testdata/corpus: scam.csv, inputs an authority blacklisted, and legit.csv, inputs of verified legitimate entities.
httpapi
Package httpapi serves the public HTTP API, following its contract (api/openapi.yaml): the server and its timeouts, the probes, and the middleware every request goes through (request identifier, access log, panic recovery, security headers).
Package httpapi serves the public HTTP API, following its contract (api/openapi.yaml): the server and its timeouts, the probes, and the middleware every request goes through (request identifier, access log, panic recovery, security headers).
httpapi/contracttest
Package contracttest checks HTTP exchanges against the public contract, api/openapi.yaml.
Package contracttest checks HTTP exchanges against the public contract, api/openapi.yaml.
reference/hosting
Package hosting reads the reference list of shared platforms that host their users' pages under a path of their own domain, shipped with the binary (platforms.csv, documented in docs/sources.md).
Package hosting reads the reference list of shared platforms that host their users' pages under a path of their own domain, shipped with the binary (platforms.csv, documented in docs/sources.md).
reference/official
Package official reads the reference list of official domains often imitated, shipped with the binary (domains.csv, documented in docs/sources.md).
Package official reads the reference list of official domains often imitated, shipped with the binary (domains.csv, documented in docs/sources.md).
registry/bodacc
Package bodacc reads the notices the BODACC (DILA, Licence Ouverte; docs/sources.md) published about a company, by SIREN only: collective procedures, radiations, conciliations and professional recoveries.
Package bodacc reads the notices the BODACC (DILA, Licence Ouverte; docs/sources.md) published about a company, by SIREN only: collective procedures, radiations, conciliations and professional recoveries.
registry/live
Package live builds the registries a check consults online: RDAP, SIRENE and BODACC, each through an HTTP client allowed its own hosts only.
Package live builds the registries a check consults online: RDAP, SIRENE and BODACC, each through an HTTP client allowed its own hosts only.
registry/rdap
Package rdap reads the registration date of a domain from the RDAP server of its registry (RFC 9082, RFC 9083), found through the IANA bootstrap file (RFC 9224), never through a third-party aggregator (docs/sources.md).
Package rdap reads the registration date of a domain from the RDAP server of its registry (RFC 9082, RFC 9083), found through the IANA bootstrap file (RFC 9224), never through a third-party aggregator (docs/sources.md).
registry/replay
Package replay records the answers of the registries and plays them back, so that the evaluation corpus is scored without the network.
Package replay records the answers of the registries and plays them back, so that the evaluation corpus is scored without the network.
registry/sirene
Package sirene reads a company's name, creation date and head office state from the API Recherche d'entreprises (DINUM, INSEE data, Licence Ouverte 2.0; docs/sources.md), by SIREN only.
Package sirene reads a company's name, creation date and head office state from the API Recherche d'entreprises (DINUM, INSEE data, Licence Ouverte 2.0; docs/sources.md), by SIREN only.
signaldoc
Package signaldoc writes the table of docs/signals.md from the signal catalog, so that the public list cannot drift from the rules.
Package signaldoc writes the table of docs/signals.md from the signal catalog, so that the public list cannot drift from the rules.
source/acpr
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).
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).
source/amf
Package amf holds the connectors of the lists the Autorité des marchés financiers publishes daily on data.gouv.fr under the Licence Ouverte 2.0 (docs/sources.md): the blacklist, and the white lists of digital asset service providers (PSAN) and of offers in goods (biens divers).
Package amf holds the connectors of the lists the Autorité des marchés financiers publishes daily on data.gouv.fr under the Licence Ouverte 2.0 (docs/sources.md): the blacklist, and the white lists of digital asset service providers (PSAN) and of offers in goods (biens divers).
source/arcep
Package arcep holds the connector of the national numbering plan the Autorité de régulation des communications électroniques, des postes et de la distribution de la presse publishes under the Licence Ouverte (docs/sources.md): the ranges of phone numbers it has assigned (MAJNUM), joined with the name and SIREN of the operator each range is assigned to (identifiants_CE).
Package arcep holds the connector of the national numbering plan the Autorité de régulation des communications électroniques, des postes et de la distribution de la presse publishes under the Licence Ouverte (docs/sources.md): the ranges of phone numbers it has assigned (MAJNUM), joined with the name and SIREN of the operator each range is assigned to (identifiants_CE).
source/catalog
Package catalog lists the sources Arnakoff syncs, how often, and the hosts they reach: the one list the sync and API processes are built from.
Package catalog lists the sources Arnakoff syncs, how often, and the hosts they reach: the one list the sync and API processes are built from.
source/listing
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.
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.
store
Package store keeps the last valid snapshot of each source on disk, shared by the sync and API processes and kept across restarts.
Package store keeps the last valid snapshot of each source on disk, shared by the sync and API processes and kept across restarts.
store/postgres
Package postgres keeps the records of the API keys in PostgreSQL (ADR 0004), through jackc/pgx: their keyed digests, never the keys.
Package postgres keeps the records of the API keys in PostgreSQL (ADR 0004), through jackc/pgx: their keyed digests, never the keys.
turnstile
Package turnstile checks a Cloudflare Turnstile token with the siteverify API, as documented at https://developers.cloudflare.com/turnstile/get-started/server-side-validation/: a form POST of the widget's secret key and the token, answered by a JSON object.
Package turnstile checks a Cloudflare Turnstile token with the siteverify API, as documented at https://developers.cloudflare.com/turnstile/get-started/server-side-validation/: a form POST of the widget's secret key and the token, answered by a JSON object.
Package app holds the use cases of Arnakoff and the ports they consume.
Package app holds the use cases of Arnakoff and the ports they consume.
Package domain holds the entities, value objects and signal rules of Arnakoff.
Package domain holds the entities, value objects and signal rules of Arnakoff.
signal
Package signal holds the signal rules: pure functions from domain values to signals, with the French wording of each in one place (docs/signals.md).
Package signal holds the signal rules: pure functions from domain values to signals, with the French wording of each in one place (docs/signals.md).
Package platform holds cross-cutting technical helpers: the outbound HTTP client, the redacting logger, the configuration and the in-memory cache (ADR 0002).
Package platform holds cross-cutting technical helpers: the outbound HTTP client, the redacting logger, the configuration and the in-memory cache (ADR 0002).
cache
Package cache keeps registry answers in memory for a while, so a burst of checks on the same identifier calls an upstream once (ADR 0002).
Package cache keeps registry answers in memory for a while, so a burst of checks on the same identifier calls an upstream once (ADR 0002).
clock
Package clock gives the commands the system time, pauses and jitter that the use cases take as ports, so the use cases stay testable.
Package clock gives the commands the system time, pauses and jitter that the use cases take as ports, so the use cases stay testable.
config
Package config reads the configuration of every command from environment variables into one typed Config, validated as a whole at startup so a command stops before doing anything with a value it cannot use (ADR 0002).
Package config reads the configuration of every command from environment variables into one typed Config, validated as a whole at startup so a command stops before doing anything with a value it cannot use (ADR 0002).
csvfile
Package csvfile reads the semicolon- or comma-separated files upstream sources publish, record by record, after checking their header.
Package csvfile reads the semicolon- or comma-separated files upstream sources publish, record by record, after checking their header.
defaults
Package defaults fills the zero fields of a configuration struct with their default value, so every Config in platform follows the same rule: zero means default, negative is invalid.
Package defaults fills the zero fields of a configuration struct with their default value, so every Config in platform follows the same rule: zero means default, negative is invalid.
httpclient
Package httpclient is the only way out to the network: every source and registry fetches through a Client (ADR 0002).
Package httpclient is the only way out to the network: every source and registry fetches through a Client (ADR 0002).
httpclient/httpclienttest
Package httpclienttest builds httpclient.Client values for tests against an httptest TLS server.
Package httpclienttest builds httpclient.Client values for tests against an httptest TLS server.
logging
Package logging builds the structured logger every command writes with: log/slog lines in JSON, personal data masked, the request identifier of the context added (ADR 0002).
Package logging builds the structured logger every command writes with: log/slog lines in JSON, personal data masked, the request identifier of the context added (ADR 0002).
logging/loggingtest
Package loggingtest builds redacting loggers for tests, writing to a buffer the test reads back.
Package loggingtest builds redacting loggers for tests, writing to a buffer the test reads back.
ratelimit
Package ratelimit limits the requests of each client with a token bucket per key, in memory and bounded: an idle bucket is forgotten, and the number of buckets is capped.
Package ratelimit limits the requests of each client with a token bucket per key, in memory and bounded: an idle bucket is forgotten, and the number of buckets is capped.
startup
Package startup is what every command does before its own work: load the typed configuration, build the redacting logger from it and make that logger the log/slog default, so no line written by the command or a library bypasses the masking of personal data (ADR 0002).
Package startup is what every command does before its own work: load the typed configuration, build the redacting logger from it and make that logger the log/slog default, so no line written by the command or a library bypasses the masking of personal data (ADR 0002).
throttle
Package throttle keeps the registry clients away from an upstream that asked to wait with a Retry-After header (RFC 9110, section 10.2.3), so a check fails fast instead of calling it again too soon.
Package throttle keeps the registry clients away from an upstream that asked to wait with a Retry-After header (RFC 9110, section 10.2.3), so a check fails fast instead of calling it again too soon.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL