Documentation
¶
Overview ¶
Package fixtures pseudonymises captured Beszel hub responses so they can be committed as test data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Kind ¶
type Kind string
Kind names the hub response a file holds and selects its rules.
const ( KindInfo Kind = "info" KindSystems Kind = "systems" KindSystemDetails Kind = "system_details" KindSystemStats Kind = "system_stats" KindContainerStats Kind = "container_stats" KindContainers Kind = "containers" KindServices Kind = "systemd_services" KindSmart Kind = "smart_devices" KindMonitors Kind = "network_monitors" KindMonitorStats Kind = "network_monitor_stats" KindPackageUpdates Kind = "package_updates" )
Response kinds the sanitiser knows.
type Sanitiser ¶
type Sanitiser struct {
// contains filtered or unexported fields
}
Sanitiser maps each original value to one pseudonym across all files, so references between records survive.
func (*Sanitiser) File ¶
File sanitises one captured response. Files that name systems must come after the systems file, so hostnames can follow their system's pseudonym.
func (*Sanitiser) Leaks ¶
Leaks reports every replaced original, deny word (case-insensitive) or private-looking value still present in files (name -> content). Originals shorter than 4 chars are skipped, and kept values are masked first, so "postgres:18" inside a kept "postgres:18-alpine" is not a leak.
func (*Sanitiser) SystemName ¶
SystemName returns the pseudonym given to the system with the original id, or "" if the systems file has not been sanitised yet.