Documentation ¶
Index ¶
- Variables
- type DefaultService
- func (d DefaultService) CopyFile(ov, od, of, nv, nd, nf string) (*models.Volume, error)
- func (d DefaultService) CreateDirectory(baseVolumeName, dirname string) (*models.Volume, error)
- func (d DefaultService) CreateFile(baseVolumeName, dirname, filename string, file []byte) (*models.Volume, error)
- func (d DefaultService) CreateVolume(accountID uint64) (*models.Volume, error)
- func (d DefaultService) GetDirectory(volumeName, dirname string) (file *os.File, err error)
- func (d DefaultService) GetFile(volumeName, filename string) (*os.File, error)
- func (d DefaultService) GetVolume(volumeName string) (*models.Volume, error)
- func (d DefaultService) GetVolumeChain(volume *models.Volume) ([]*models.Volume, error)
- func (d DefaultService) RemoveFile(baseVolumeName, dirname, filename string) (*models.Volume, error)
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewVolumeService)
Functions ¶
This section is empty.
Types ¶
type DefaultService ¶
type DefaultService struct { Repository repositories.Repository Storage storages.Storage // contains filtered or unexported fields }
func (DefaultService) CopyFile ¶ added in v0.0.25
func (d DefaultService) CopyFile(ov, od, of, nv, nd, nf string) (*models.Volume, error)
func (DefaultService) CreateDirectory ¶
func (d DefaultService) CreateDirectory(baseVolumeName, dirname string) (*models.Volume, error)
func (DefaultService) CreateFile ¶
func (DefaultService) CreateVolume ¶
func (d DefaultService) CreateVolume(accountID uint64) (*models.Volume, error)
func (DefaultService) GetDirectory ¶
func (d DefaultService) GetDirectory(volumeName, dirname string) (file *os.File, err error)
func (DefaultService) GetFile ¶
func (d DefaultService) GetFile(volumeName, filename string) (*os.File, error)
func (DefaultService) GetVolume ¶
func (d DefaultService) GetVolume(volumeName string) (*models.Volume, error)
func (DefaultService) GetVolumeChain ¶
func (DefaultService) RemoveFile ¶ added in v0.0.25
func (d DefaultService) RemoveFile(baseVolumeName, dirname, filename string) (*models.Volume, error)
type Service ¶
type Service interface { CreateVolume(createdBy uint64) (*models.Volume, error) CreateDirectory(baseVolumeName, dirname string) (*models.Volume, error) CreateFile(baseVolumeName, dirname, filename string, file []byte) (*models.Volume, error) RemoveFile(baseVolumeName, dirname, filename string) (*models.Volume, error) CopyFile(ov, od, of, nv, nd, nf string) (*models.Volume, error) GetVolume(volumeName string) (*models.Volume, error) GetDirectory(volumeName, dirname string) (file *os.File, err error) GetFile(volumeName, filename string) (*os.File, error) }
func CreateVolumesService ¶
func CreateVolumesService(cf string, sto storages.Storage, repository repositories.Repository) (Service, error)
func NewVolumeService ¶
func NewVolumeService(logger *zap.Logger, Storage storages.Storage, Repository repositories.Repository) Service
Click to show internal directories.
Click to hide internal directories.