(Feat): Initial Commit
This commit is contained in:
46
internal/models/types.go
Normal file
46
internal/models/types.go
Normal file
@@ -0,0 +1,46 @@
|
||||
package models
|
||||
|
||||
type ArchiveType string
|
||||
|
||||
const (
|
||||
ZIP ArchiveType = "ZIP"
|
||||
TARGZ ArchiveType = "TAR.GZ"
|
||||
TAR ArchiveType = "TAR"
|
||||
GZIP ArchiveType = "GZIP"
|
||||
AUTO ArchiveType = "AUTO"
|
||||
)
|
||||
|
||||
type CompressConfig struct {
|
||||
SourcePath string
|
||||
OutputPath string
|
||||
ArchiveType ArchiveType
|
||||
ExcludePaths []string
|
||||
IncludePaths []string
|
||||
VerifyIntegrity bool
|
||||
CompressionLevel int
|
||||
}
|
||||
|
||||
type ExtractConfig struct {
|
||||
ArchivePath string
|
||||
DestPath string
|
||||
ArchiveType ArchiveType
|
||||
OverwriteAll bool
|
||||
PreservePerms bool
|
||||
}
|
||||
|
||||
type ArchiveInfo struct {
|
||||
Type ArchiveType
|
||||
FileCount int
|
||||
TotalSize int64
|
||||
CompressedSize int64
|
||||
CompressionRatio float64
|
||||
Files []FileInfo
|
||||
Checksum string
|
||||
}
|
||||
|
||||
type FileInfo struct {
|
||||
Name string
|
||||
Size int64
|
||||
IsDir bool
|
||||
ModTime string
|
||||
}
|
||||
Reference in New Issue
Block a user