Documentation
¶
Overview ¶
Package vaultcopy implements a backend-agnostic copy of a vault's contents (teams, bots, assets and their versions, installation scopes, audit history, and usage history) from one vault into another. It is the engine behind `sx vault copy`.
Everything is read through the vault.Vault interface (plus a couple of optional capability interfaces), so any source/destination combination of path, git, and skills.new vaults works. The copy is best-effort at the item level: a failure copying one team/asset/etc. is recorded as a warning and the copy continues, so a single bad item never aborts a whole migration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Report ¶
type Report struct {
Teams int
Bots int
Assets int
Versions int
SkippedVersions int
Scopes int
AuditEvents int
UsageEvents int
Warnings []string
}
Report summarizes what a copy did (or would do, for a dry run).
func Copy ¶
Copy migrates the selected categories from src into dst. Each category is independent: a category-level failure is recorded as a warning and the copy moves on to the next, so one broken category (e.g. audit) never costs the others (e.g. usage). Always returns a Report for partial-progress reporting.