platform

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package platform holds cross-cutting technical helpers: the outbound HTTP client, the redacting logger, the configuration and the in-memory cache (ADR 0002).

Directories

Path Synopsis
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).
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).
Package csvfile reads the semicolon-separated files upstream sources publish, record by record, after checking their header.
Package csvfile reads the semicolon-separated files upstream sources publish, record by record, after checking their header.
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.
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).
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.
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).
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).

Jump to

Keyboard shortcuts

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