Documentation
¶
Overview ¶
Package types defines shared application data types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupInfo ¶
type BackupInfo struct {
// Timestamp del backup
Timestamp time.Time
// Nome del file di backup
Filename string
// Dimensione del file in bytes
Size int64
// Checksum SHA256
Checksum string
// Tipo di compressione usata
Compression CompressionType
// Path completo del file
Path string
// Tipo di ambiente Proxmox
ProxmoxType ProxmoxType
}
BackupInfo contiene informazioni su un backup
type BackupMetadata ¶
type BackupMetadata struct {
// BackupFile is the full path to the backup file
BackupFile string
// Timestamp is when the backup was created
Timestamp time.Time
// Size is the file size in bytes
Size int64
// Checksum is the SHA256 checksum of the backup file
Checksum string
// ProxmoxType is the type of Proxmox environment (PVE/PBS)
ProxmoxType ProxmoxType
// Compression is the compression type used
Compression CompressionType
// Version is the backup format version
Version string
}
BackupMetadata contains metadata about a backup file Used by storage backends to track backup files
type CompressionType ¶
type CompressionType string
CompressionType rappresenta il tipo di compressione
const ( // CompressionGzip - Compressione gzip CompressionGzip CompressionType = "gz" // CompressionPigz - Compressione gzip parallela (pigz) CompressionPigz CompressionType = "pigz" // CompressionBzip2 - Compressione bzip2 CompressionBzip2 CompressionType = "bz2" // CompressionXZ - Compressione xz (LZMA) CompressionXZ CompressionType = "xz" // CompressionLZMA - Compressione lzma classica CompressionLZMA CompressionType = "lzma" // CompressionZstd - Compressione zstd CompressionZstd CompressionType = "zst" // CompressionNone - Nessuna compressione CompressionNone CompressionType = "none" )
func (CompressionType) String ¶
func (c CompressionType) String() string
String restituisce la rappresentazione stringa del tipo di compressione
type ExitCode ¶
type ExitCode int
ExitCode represents the application's exit codes.
const ( // ExitSuccess - Execution completed successfully. ExitSuccess ExitCode = 0 // ExitGenericError - Unspecified generic error. ExitGenericError ExitCode = 1 // ExitConfigError - Configuration error. ExitConfigError ExitCode = 2 // ExitEnvironmentError - Invalid or unsupported Proxmox environment. ExitEnvironmentError ExitCode = 3 // ExitBackupError - Error during the backup operation (generic). ExitBackupError ExitCode = 4 // ExitStorageError - Error during storage operations. ExitStorageError ExitCode = 5 // ExitNetworkError - Network error (upload, notifications, etc.). ExitNetworkError ExitCode = 6 // ExitPermissionError - Permission error. ExitPermissionError ExitCode = 7 // ExitVerificationError - Error during integrity verification. ExitVerificationError ExitCode = 8 // ExitCollectionError - Error during collection of configuration files. ExitCollectionError ExitCode = 9 // ExitArchiveError - Error while creating the archive. ExitArchiveError ExitCode = 10 // ExitCompressionError - Error during compression. ExitCompressionError ExitCode = 11 // ExitDiskSpaceError - Insufficient disk space. ExitDiskSpaceError ExitCode = 12 // ExitPanicError - Unhandled panic caught. ExitPanicError ExitCode = 13 // ExitSecurityError - Errors detected by the security check. ExitSecurityError ExitCode = 14 )
type LogLevel ¶
type LogLevel int
LogLevel rappresenta il livello di logging
const ( // LogLevelDebug - Log di debug (massimo dettaglio) LogLevelDebug LogLevel = 5 // LogLevelInfo - Informazioni generali LogLevelInfo LogLevel = 4 // LogLevelWarning - Avvisi LogLevelWarning LogLevel = 3 // LogLevelError - Errori LogLevelError LogLevel = 2 // LogLevelCritical - Errori critici LogLevelCritical LogLevel = 1 // LogLevelNone - Nessun log LogLevelNone LogLevel = 0 )
type ProxmoxType ¶
type ProxmoxType string
ProxmoxType rappresenta il tipo di ambiente Proxmox
const ( // ProxmoxVE - Proxmox Virtual Environment ProxmoxVE ProxmoxType = "pve" // ProxmoxBS - Proxmox Backup Server ProxmoxBS ProxmoxType = "pbs" // ProxmoxUnknown - Tipo sconosciuto o non rilevato ProxmoxUnknown ProxmoxType = "unknown" )
func (ProxmoxType) String ¶
func (p ProxmoxType) String() string
String restituisce la rappresentazione stringa del tipo Proxmox
type StorageLocation ¶
type StorageLocation string
StorageLocation rappresenta una destinazione di storage
const ( // StorageLocal - Storage locale StorageLocal StorageLocation = "local" // StorageSecondary - Storage secondario StorageSecondary StorageLocation = "secondary" // StorageCloud - Storage cloud (rclone) StorageCloud StorageLocation = "cloud" )
func (StorageLocation) String ¶
func (s StorageLocation) String() string
String restituisce la rappresentazione stringa della location