Documentation ¶
Index ¶
- type ReadCloserInformer
- type ReadCloserInformerProvider
- type ResumableUploadService
- func (rsu *ResumableUploadService) Close()
- func (rsu *ResumableUploadService) DeleteFile(uid int64, fileID string, chunkCount int) error
- func (rsu *ResumableUploadService) IsUploadFinished(uid int64, fileID string, chunkCount int, expectedSize int64) (bool, error)
- func (rsu *ResumableUploadService) NewFileReader(uid int64, fileID string, chunkCount int) (ReadCloserInformer, error)
- func (rsu *ResumableUploadService) PutChunk(uid int64, fileID string, chunkNumber int, chunk []byte) error
- func (rsu *ResumableUploadService) TestChunk(uid int64, fileID string, chunkNumber int, chunkSize int64) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReadCloserInformer ¶
type ReadCloserInformerProvider ¶
type ReadCloserInformerProvider interface {
GetReadCloserInformer() (ReadCloserInformer, error)
}
type ResumableUploadService ¶
type ResumableUploadService struct {
// contains filtered or unexported fields
}
func New ¶
func New(path string) (*ResumableUploadService, error)
func (*ResumableUploadService) Close ¶
func (rsu *ResumableUploadService) Close()
Close stops what needs to be stopped
func (*ResumableUploadService) DeleteFile ¶
func (rsu *ResumableUploadService) DeleteFile(uid int64, fileID string, chunkCount int) error
DeleteFile deletes the whole file bucket
func (*ResumableUploadService) IsUploadFinished ¶
func (rsu *ResumableUploadService) IsUploadFinished(uid int64, fileID string, chunkCount int, expectedSize int64) (bool, error)
IsUploadFinished compares the total size of stored chunks a to provided size
func (*ResumableUploadService) NewFileReader ¶
func (rsu *ResumableUploadService) NewFileReader(uid int64, fileID string, chunkCount int) (ReadCloserInformer, error)
NewFileReader returns a reader that reconstructs the file from the chunks on the fly. It does not check if the file is complete.
Click to show internal directories.
Click to hide internal directories.