Documentation ¶
Index ¶
- Variables
- type FileManager
- func (m *FileManager) CreateDirectory(volume, directory string) error
- func (m *FileManager) CreateFile(volume, fileName string, data []byte) error
- func (m *FileManager) FetchDirectory(volume *models.Volume, directory string) (file *os.File, err error)
- func (m *FileManager) FetchFile(volume *models.Volume, fileName string) (*os.File, 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) CreateDirectory ¶
func (m *FileManager) CreateDirectory(volume, directory string) error
func (*FileManager) CreateFile ¶
func (m *FileManager) CreateFile(volume, fileName string, data []byte) error
func (*FileManager) FetchDirectory ¶ added in v0.0.25
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 *models.Volume, fileName string) (*os.File, error) FetchDirectory(volume *models.Volume, directory string) (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.