Documentation
¶
Overview ¶
Package dump reads/writes awg-admin's boltdb as a portable JSON snapshot of every bucket's raw key/value pairs — the format shared by the in-app backup (Service.Backup / the desktop "Backup" button / the standalone GET /backup) and the standalone awg-migrate CLI, so a backup taken from one can be restored with the other. It's deliberately schema-agnostic: it copies bytes, not models, so it doesn't need to know anything about the application schema (and isn't tripped up by the historical bktUsers/bktInterfaces bucket-name mismatch in storage/boltdb). The binary format of the values is an internal implementation detail, not a stable cross-version contract — a dump is only guaranteed to restore into the same awg-admin version it was taken from.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dump ¶
type Dump struct {
Buckets map[string]map[string]json.RawMessage `json:"buckets"`
}
Dump is the on-disk JSON shape: bucket name -> (hex-encoded key -> raw JSON value). Keys are hex-encoded rather than left as plain strings because several buckets (servers, interfaces, users) key their entries by raw 16-byte UUIDs, which aren't valid UTF-8/JSON string content as-is.