Documentation ¶
Index ¶
- Variables
- type StorageUseCase
- func (s *StorageUseCase) BigFileUpload(vid string, w http.ResponseWriter, r *http.Request) error
- func (s *StorageUseCase) CreateFile(ctx context.Context, req *storageV1.CreateFileReq) error
- func (s *StorageUseCase) CreateVolume(ctx context.Context, vol Volume) (*Volume, error)
- func (s *StorageUseCase) DelFile(ctx context.Context, id string, path string) error
- func (s *StorageUseCase) DelVolume(ctx context.Context, vid string) error
- func (s *StorageUseCase) GetFileData(ctx context.Context, id, path string) (string, error)
- func (s *StorageUseCase) GetFileUrl(ctx context.Context, id, path string) (string, error)
- func (s *StorageUseCase) ListFile(ctx context.Context, id string, op provider.ListOption) ([]provider.FileInfo, error)
- func (s *StorageUseCase) ListVolume(ctx context.Context) ([]*Volume, error)
- func (s *StorageUseCase) MoveFile(ctx context.Context, req *storageV1.MoveCopyFileReq) error
- func (s *StorageUseCase) PutFile(ctx context.Context, req *storageV1.SaveFileReq) error
- func (s *StorageUseCase) RenameFile(ctx context.Context, id string, path, newPath string, wireType uint32) error
- type Volume
- type VolumeManager
- type VolumeRepo
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewVolumeManager, NewStorageUseCase)
Functions ¶
This section is empty.
Types ¶
type StorageUseCase ¶
type StorageUseCase struct {
// contains filtered or unexported fields
}
func NewStorageUseCase ¶
func NewStorageUseCase(volumeManager *VolumeManager) *StorageUseCase
func (*StorageUseCase) BigFileUpload ¶
func (s *StorageUseCase) BigFileUpload(vid string, w http.ResponseWriter, r *http.Request) error
大文件上传
func (*StorageUseCase) CreateFile ¶
func (s *StorageUseCase) CreateFile(ctx context.Context, req *storageV1.CreateFileReq) error
创建文件或者目录
func (*StorageUseCase) CreateVolume ¶
创建存储卷
func (*StorageUseCase) DelVolume ¶
func (s *StorageUseCase) DelVolume(ctx context.Context, vid string) error
删除存储卷
func (*StorageUseCase) GetFileData ¶
func (*StorageUseCase) GetFileUrl ¶
func (*StorageUseCase) ListFile ¶
func (s *StorageUseCase) ListFile(ctx context.Context, id string, op provider.ListOption) ([]provider.FileInfo, error)
文件列表
func (*StorageUseCase) ListVolume ¶
func (s *StorageUseCase) ListVolume(ctx context.Context) ([]*Volume, error)
存储卷列表
func (*StorageUseCase) MoveFile ¶
func (s *StorageUseCase) MoveFile(ctx context.Context, req *storageV1.MoveCopyFileReq) error
复制/移动文件
func (*StorageUseCase) PutFile ¶
func (s *StorageUseCase) PutFile(ctx context.Context, req *storageV1.SaveFileReq) error
func (*StorageUseCase) RenameFile ¶
func (s *StorageUseCase) RenameFile(ctx context.Context, id string, path, newPath string, wireType uint32) error
重命名文件
type VolumeManager ¶
type VolumeManager struct {
// contains filtered or unexported fields
}
卷管理器
func (*VolumeManager) CreateVolume ¶
创建卷
func (*VolumeManager) DelVolume ¶
func (m *VolumeManager) DelVolume(ctx context.Context, vid string) error
删除卷
func (*VolumeManager) GetVolume ¶
func (m *VolumeManager) GetVolume(vid string) (*Volume, error)
获取卷
func (*VolumeManager) GetVolumeAll ¶
func (m *VolumeManager) GetVolumeAll(ctx context.Context) ([]*Volume, error)
获取卷
Click to show internal directories.
Click to hide internal directories.