Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupManager ¶
type BackupManager interface {
CreateBackup(ctx context.Context, originalPath string) (string, error)
RestoreBackup(ctx context.Context, backupPath string, originalPath string) error
CleanupBackup(backupPath string) error
}
BackupManager handles file backup operations
type ChunkManager ¶
type ChunkManager interface {
WriteChunk(ctx context.Context, req ChunkWriteRequest) error
FinalizeChunks(ctx context.Context, sessionID string, targetPath string) (*WriteResult, error)
CleanupSession(sessionID string) error
GetSessionInfo(sessionID string) (*ChunkSessionInfo, error)
}
ChunkManager defines the interface for handling chunked file writes
type ChunkSessionInfo ¶
type ChunkSessionInfo struct {
SessionID string
TotalChunks int
ReceivedChunks int
TempPath string
Created bool
}
ChunkSessionInfo provides information about an active chunk session
type ChunkWriteRequest ¶
ChunkWriteRequest represents a chunk write operation
type FileWriter ¶
type FileWriter interface {
Write(ctx context.Context, req WriteRequest) (*WriteResult, error)
ValidatePath(path string) error
}
FileWriter defines the interface for file writing operations
type PathValidator ¶
type PathValidator interface {
Validate(path string) error
IsWritable(path string) bool
IsInSandbox(path string) bool
}
PathValidator validates file paths for security and accessibility
type StreamWriter ¶
StreamWriter provides streaming write capabilities
type WriteRequest ¶
WriteRequest represents a file write operation request
Click to show internal directories.
Click to hide internal directories.