Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
func (*File) UploadFile ¶
func (f *File) UploadFile(ctx context.Context, req *UploadFileReq, cb UploadFileCallback) (*UploadFileResp, error)
type Md5Reader ¶
type Md5Reader struct {
// contains filtered or unexported fields
}
func NewMd5Reader ¶
type UploadFileCallback ¶
type UploadFileCallback interface { Open(size int64) // file opening size PartSize(partSize int64, num int) // shard size, number HashPartProgress(index int, size int64, partHash string) // hash value of each shard HashPartComplete(partsHash string, fileHash string) // sharding is complete, server marks hash and file final hash UploadID(uploadID string) // upload ID UploadPartComplete(index int, partSize int64, partHash string) // upload shard progress UploadComplete(fileSize int64, streamSize int64, storageSize int64) // overall progress Complete(size int64, url string, typ int) // upload completed }
type UploadFileReq ¶
type UploadFileResp ¶
type UploadFileResp struct {
URL string `json:"url"`
}
type UploadInfo ¶
type UploadInfo struct { PartNum int Bitmap *Bitmap DBInfo *model_struct.LocalUpload Resp *third.InitiateMultipartUploadResp CreateTime time.Time BatchSignNum int32 // contains filtered or unexported fields }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.