Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupData ¶
type BackupData struct {
Passwords []keyring.Entry `json:"passwords"`
Metadata BackupMetadata `json:"metadata"`
}
BackupData represents the structure of a backup file
type BackupInfo ¶
type BackupInfo struct {
Name string `json:"name"`
Path string `json:"path"`
Size int64 `json:"size"`
ModTime time.Time `json:"mod_time"`
}
BackupInfo contains information about a backup file
type BackupMetadata ¶
type BackupMetadata struct {
BackupDate time.Time `json:"backup_date"`
Hostname string `json:"hostname"`
User string `json:"user"`
Version string `json:"version"`
PasswordCount int `json:"password_count"`
Checksum string `json:"checksum"`
}
BackupMetadata contains information about the backup
type BackupOptions ¶
type BackupOptions struct {
OutputPath string
UseGPG bool
UsePassword bool
BackupDir string
MaxBackups int
}
BackupOptions contains options for backup operations
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager handles backup and restore operations
func New ¶
func New(kr keyring.KeyringInterface, opts *BackupOptions) *Manager
New creates a new backup manager
func (*Manager) CleanOldBackups ¶
CleanOldBackups removes old backup files, keeping only the most recent ones
func (*Manager) CreateBackup ¶
CreateBackup creates a new backup of all passwords
func (*Manager) ListBackups ¶
func (m *Manager) ListBackups() ([]BackupInfo, error)
ListBackups lists available backup files
func (*Manager) RestoreBackup ¶
RestoreBackup restores passwords from a backup file
func (*Manager) VerifyBackup ¶
VerifyBackup verifies the integrity of a backup file
Click to show internal directories.
Click to hide internal directories.