Documentation
¶
Overview ¶
Package backupbrowser provides deterministic backup-tree construction, paging, and restore-selection validation.
Index ¶
- func Browse(entries []backuptypes.BackupFileEntry, params pagination.QueryParams) ([]backuptypes.BackupFileEntry, pagination.Response)
- func BuildEntries(paths []string, browsePath string, recursive bool) []backuptypes.BackupFileEntry
- func ListScope(requestedPath string, params pagination.QueryParams) (listPath string, recursive bool, err error)
- func NormalizePath(value string, allowEmpty bool) (string, error)
- func NormalizeSelection(selection backuptypes.RestoreSelection, eligible []backuptypes.BackupFileEntry) ([]backuptypes.BackupFileEntry, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Browse ¶
func Browse(entries []backuptypes.BackupFileEntry, params pagination.QueryParams) ([]backuptypes.BackupFileEntry, pagination.Response)
Browse searches, orders, and paginates backup entries using the standard pagination contract.
func BuildEntries ¶
func BuildEntries(paths []string, browsePath string, recursive bool) []backuptypes.BackupFileEntry
BuildEntries converts archive or Rustic path output into a synthesized tree. Paths are returned relative to the supplied logical root.
func ListScope ¶
func ListScope(requestedPath string, params pagination.QueryParams) (listPath string, recursive bool, err error)
ListScope resolves the snapshot listing scope for one browse request: the whole tree when searching, otherwise just the requested folder.
func NormalizePath ¶
NormalizePath validates and normalizes a path relative to a backup root.
func NormalizeSelection ¶
func NormalizeSelection(selection backuptypes.RestoreSelection, eligible []backuptypes.BackupFileEntry) ([]backuptypes.BackupFileEntry, error)
NormalizeSelection validates explicit selections against eligible entries, deduplicates them, and removes descendants covered by selected directories.
Types ¶
This section is empty.