Documentation ¶
Index ¶
- type FileLocalRepo
- func (r *FileLocalRepo) DeleteFile(fileID string) error
- func (r *FileLocalRepo) EnsureBaseDir(filepath string) error
- func (r *FileLocalRepo) GetFileContentType(fileID string) string
- func (r *FileLocalRepo) MatchExt(filename string, extensions []string) bool
- func (r *FileLocalRepo) SaveFile(file *multipart.FileHeader) (string, error)
- func (r *FileLocalRepo) StreamFile(fileID string) (io.Reader, error)
- type ListRepo
- func (r *ListRepo) Create(l model.List) (model.List, error)
- func (r *ListRepo) DeleteByID(id uint) error
- func (r *ListRepo) GetAll(offset, limit int) ([]model.List, int, error)
- func (r *ListRepo) GetByID(id uint) (model.List, error)
- func (r *ListRepo) GetRoots(offset, limit int, preload bool) ([]model.List, int, error)
- func (r *ListRepo) Update(l *model.List) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileLocalRepo ¶
type FileLocalRepo struct {
BasePath string
}
func NewFileRepo ¶
func NewFileRepo(basePath string) *FileLocalRepo
func (*FileLocalRepo) DeleteFile ¶
func (r *FileLocalRepo) DeleteFile(fileID string) error
func (*FileLocalRepo) EnsureBaseDir ¶
func (r *FileLocalRepo) EnsureBaseDir(filepath string) error
func (*FileLocalRepo) GetFileContentType ¶
func (r *FileLocalRepo) GetFileContentType(fileID string) string
func (*FileLocalRepo) MatchExt ¶
func (r *FileLocalRepo) MatchExt(filename string, extensions []string) bool
func (*FileLocalRepo) SaveFile ¶
func (r *FileLocalRepo) SaveFile(file *multipart.FileHeader) (string, error)
func (*FileLocalRepo) StreamFile ¶
func (r *FileLocalRepo) StreamFile(fileID string) (io.Reader, error)
type ListRepo ¶
type ListRepo struct {
// contains filtered or unexported fields
}
func NewListRepo ¶
func (*ListRepo) DeleteByID ¶
Click to show internal directories.
Click to hide internal directories.