Documentation
¶
Index ¶
- func CleanupOldArchives(retentionCount int) (int, error)
- func DeleteArchive(archivePath string) error
- func ExportAllEnvironments(outputPath string) error
- func ExportEnvironment(envName, outputPath string) error
- func ExportEnvironments(envNames []string, outputDir string) error
- func GetArchiveDir() (string, error)
- func ImportAll(dirPath string, force bool) error
- func ImportEnvironment(archivePath string, options ImportOptions) error
- func RestoreArchive(archivePath, destPath string) error
- type Archive
- type ExportOptions
- type ImportOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupOldArchives ¶
CleanupOldArchives removes old archives based on retention policy
func DeleteArchive ¶
DeleteArchive removes an archive file
func ExportAllEnvironments ¶
ExportAllEnvironments exports all environments to a single archive or directory
func ExportEnvironment ¶
ExportEnvironment exports a single environment to a file
func ExportEnvironments ¶
ExportEnvironments exports multiple specific environments
func GetArchiveDir ¶
GetArchiveDir returns the path to the archive directory
func ImportEnvironment ¶
func ImportEnvironment(archivePath string, options ImportOptions) error
ImportEnvironment imports an environment from an archive file
func RestoreArchive ¶
RestoreArchive extracts an archived environment (for future use)
Types ¶
type Archive ¶
type Archive struct {
Path string
EnvName string
ArchivedAt time.Time
OriginalEnv *environment.Environment
}
Archive represents an archived environment
func ArchiveEnvironment ¶
func ArchiveEnvironment(env *environment.Environment) (*Archive, error)
ArchiveEnvironment creates a compressed archive of an environment before deletion
func ListArchives ¶
ListArchives returns all archived environments
type ExportOptions ¶
type ExportOptions struct {
OutputPath string // Path to output file
EnvNames []string // Specific environments to export (empty = all)
All bool // Export all environments
}
ExportOptions defines options for exporting environments
type ImportOptions ¶
type ImportOptions struct {
ArchivePath string // Path to archive file
NewName string // Optional: new name for the environment
Force bool // Overwrite existing environment
}
ImportOptions defines options for importing environments