Documentation ¶
Index ¶
- Variables
- type FileManager
- func (m *FileManager) ArchiveDirectory(volume, directory string) (file *os.File, err error)
- func (m *FileManager) ArchiveVolume(volume *models.Volume) (file *os.File, err error)
- func (m *FileManager) CreateDirectory(volume, directory string) error
- func (m *FileManager) CreateFile(volume, fileName string, data []byte) error
- func (m *FileManager) FetchFile(volume, fileName string) ([]byte, error)
- func (m *FileManager) IsFileExists(volume, fileName string) bool
- type Storage
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewFileManager)
Functions ¶
This section is empty.
Types ¶
type FileManager ¶
type FileManager struct {
// contains filtered or unexported fields
}
func (*FileManager) ArchiveDirectory ¶
func (m *FileManager) ArchiveDirectory(volume, directory string) (file *os.File, err error)
func (*FileManager) ArchiveVolume ¶
func (*FileManager) CreateDirectory ¶
func (m *FileManager) CreateDirectory(volume, directory string) error
func (*FileManager) CreateFile ¶
func (m *FileManager) CreateFile(volume, fileName string, data []byte) error
func (*FileManager) FetchFile ¶
func (m *FileManager) FetchFile(volume, fileName string) ([]byte, error)
func (*FileManager) IsFileExists ¶
func (m *FileManager) IsFileExists(volume, fileName string) bool
type Storage ¶
type Storage interface { CreateDirectory(volume, directory string) error CreateFile(volume, fileName string, data []byte) error IsFileExists(volume, fileName string) bool FetchFile(volume, fileName string) ([]byte, error) ArchiveDirectory(volume, directory string) (file *os.File, err error) ArchiveVolume(volume *models.Volume) (file *os.File, err error) }
func CreateFileRepository ¶
func NewFileManager ¶
func NewFileManager(logger *zap.Logger, fm files.FileManager) Storage
Click to show internal directories.
Click to hide internal directories.