Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileStorage ¶
type FileStorage interface { // SaveFile saves a file to storage SaveFile(file *multipart.FileHeader, taskID, userID uuid.UUID) (string, error) // GetFile retrieves a file from storage GetFile(storagePath string) (io.ReadCloser, error) // DeleteFile deletes a file from storage DeleteFile(storagePath string) error }
FileStorage defines the interface for file storage operations
func NewLocalFileStorage ¶
func NewLocalFileStorage(basePath string) FileStorage
NewLocalFileStorage creates a new LocalFileStorage
type LocalFileStorage ¶
type LocalFileStorage struct {
// contains filtered or unexported fields
}
LocalFileStorage implements FileStorage using the local file system
func (*LocalFileStorage) DeleteFile ¶
func (s *LocalFileStorage) DeleteFile(storagePath string) error
DeleteFile deletes a file from storage
func (*LocalFileStorage) GetFile ¶
func (s *LocalFileStorage) GetFile(storagePath string) (io.ReadCloser, error)
GetFile retrieves a file from storage
func (*LocalFileStorage) SaveFile ¶
func (s *LocalFileStorage) SaveFile(file *multipart.FileHeader, taskID, userID uuid.UUID) (string, error)
SaveFile saves a file to storage
Click to show internal directories.
Click to hide internal directories.