Documentation
¶
Index ¶
- type FileStore
- type Module
- func (m *Module) CreateDir(project, token string, req *model.CreateFileRequest) (int, error)
- func (m *Module) DeleteFile(project, token, path string) (int, error)
- func (m *Module) DownloadFile(project, token, path string) (int, *model.File, error)
- func (m *Module) IsEnabled() bool
- func (m *Module) ListFiles(project, token string, req *model.ListFilesRequest) (int, []*model.ListFilesResponse, error)
- func (m *Module) SetConfig(conf *config.FileStore) error
- func (m *Module) UploadFile(project, token string, req *model.CreateFileRequest, reader io.Reader) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileStore ¶
type FileStore interface { CreateFile(req *model.CreateFileRequest, file io.Reader) error CreateDir(req *model.CreateFileRequest) error ListDir(req *model.ListFilesRequest) ([]*model.ListFilesResponse, error) ReadFile(path string) (*model.File, error) DeleteDir(path string) error DeleteFile(path string) error GetStoreType() utils.FileStoreType Close() error }
FileStore abstracts the implementation file storage operations
type Module ¶
Module is responsible for managing the file storage module
func (*Module) DeleteFile ¶
DeleteFile deletes a file at the provided path
func (*Module) DownloadFile ¶
DownloadFile downloads a file from the provided path
func (*Module) ListFiles ¶
func (m *Module) ListFiles(project, token string, req *model.ListFilesRequest) (int, []*model.ListFilesResponse, error)
ListFiles lists all the files in the provided path
func (*Module) UploadFile ¶
func (m *Module) UploadFile(project, token string, req *model.CreateFileRequest, reader io.Reader) (int, error)
UploadFile uploads a file to the provided path
Click to show internal directories.
Click to hide internal directories.