Documentation ¶
Index ¶
- Variables
- type FileProvider
- func (fp *FileProvider) Download(ctx context.Context, filePath string) (mrtype.File, error)
- func (fp *FileProvider) DownloadFile(ctx context.Context, filePath string) (io.ReadCloser, error)
- func (fp *FileProvider) Info(ctx context.Context, filePath string) (mrtype.FileInfo, error)
- func (fp *FileProvider) Remove(ctx context.Context, filePath string) error
- func (fp *FileProvider) Upload(ctx context.Context, file mrtype.File) error
- type FileSystem
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FactoryErrInvalidPath = mrerr.NewFactoryWithCaller( "errMrFileStorageInvalidPath", mrerr.ErrorKindInternal, "invalid path '{{ .path }}'") )
Functions ¶
This section is empty.
Types ¶
type FileProvider ¶ added in v0.6.8
type FileProvider struct {
// contains filtered or unexported fields
}
func NewFileProvider ¶ added in v0.6.8
func NewFileProvider(fs *FileSystem, rootDir string) *FileProvider
func (*FileProvider) DownloadFile ¶ added in v0.7.0
func (fp *FileProvider) DownloadFile(ctx context.Context, filePath string) (io.ReadCloser, error)
type FileSystem ¶ added in v0.6.8
type FileSystem struct {
// contains filtered or unexported fields
}
func New ¶
func New(opt Options) *FileSystem
func (*FileSystem) CreateDirIfNotExists ¶ added in v0.6.8
func (f *FileSystem) CreateDirIfNotExists(rootDir string, dirPath string) error
func (*FileSystem) InitRootDir ¶ added in v0.6.8
func (f *FileSystem) InitRootDir(path string) (bool, error)
Click to show internal directories.
Click to hide internal directories.