Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Analyzer ¶
type Analyzer struct {
// contains filtered or unexported fields
}
Analyzer handles analyzing backup files
func NewAnalyzer ¶
NewAnalyzer creates a new analyzer instance
func (*Analyzer) AnalyzeBackup ¶
func (a *Analyzer) AnalyzeBackup(archivePath string) (*BackupAnalysis, error)
AnalyzeBackup analyzes a backup file and returns metadata without restoring
type BackupAnalysis ¶
type BackupAnalysis struct {
Valid bool `json:"valid"`
AviaryVersion string `json:"aviary_version"`
GitCommit string `json:"git_commit"`
ExportTimestamp string `json:"export_timestamp"`
DatabaseType string `json:"database_type"`
UserCount int `json:"user_count"`
APIKeyCount int `json:"api_key_count"`
DocumentCount int64 `json:"document_count"`
TotalSizeBytes int64 `json:"total_size_bytes"`
ExportedTables []string `json:"exported_tables"`
UsersExported []string `json:"users_exported"`
Errors []string `json:"errors,omitempty"`
Warnings []string `json:"warnings,omitempty"`
}
BackupAnalysis contains the results of analyzing a backup file
type ExportMetadata ¶
type ExportMetadata struct {
AviaryVersion string `json:"aviary_version"`
GitCommit string `json:"git_commit"`
ExportTimestamp time.Time `json:"export_timestamp"`
DatabaseType string `json:"database_type"`
UsersExported []string `json:"users_exported"`
TotalDocuments int64 `json:"total_documents"`
TotalSizeBytes int64 `json:"total_size_bytes"`
ExportedTables []string `json:"exported_tables"`
}
ExportMetadata contains information about the export
type ExportOptions ¶
type ExportOptions struct {
IncludeDatabase bool
IncludeFiles bool
IncludeConfigs bool
UserIDs []uuid.UUID // If specified, only export these users
}
ExportOptions configures what to include in the export
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
Exporter handles creating complete backups
func NewExporter ¶
NewExporter creates a new exporter instance
type ImportOptions ¶
type ImportOptions struct {
OverwriteFiles bool
OverwriteDatabase bool
UserIDs []uuid.UUID // If specified, only import these users
}
ImportOptions configures how to handle the import
type Importer ¶
type Importer struct {
// contains filtered or unexported fields
}
Importer handles restoring from backup archives
func NewImporter ¶
NewImporter creates a new importer instance
func (*Importer) Import ¶
func (i *Importer) Import(archivePath string, options ImportOptions) (*ExportMetadata, error)
Import restores from a backup archive
Click to show internal directories.
Click to hide internal directories.