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(project string, req *model.CreateFileRequest, file io.Reader) error
CreateDir(project string, req *model.CreateFileRequest) error
ListDir(project string, req *model.ListFilesRequest) ([]*model.ListFilesResponse, error)
ReadFile(project, path string) (*model.File, error)
DeleteDir(project, path string) error
DeleteFile(project, 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.