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) // 文件打开的大小 PartSize(partSize int64, num int) // 分片大小,数量 HashPartProgress(index int, size int64, partHash string) // 每块分片的hash值 HashPartComplete(partsHash string, fileHash string) // 分块完成,服务端标记hash和文件最终hash UploadID(uploadID string) // 上传ID UploadPartComplete(index int, partSize int64, partHash string) // 上传分片进度 UploadComplete(fileSize int64, streamSize int64, storageSize int64) // 整体进度 Complete(size int64, url string, typ int) // 上传完成 }
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 //Signs *AuthSignParts CreateTime time.Time BatchSignNum int32 // contains filtered or unexported fields }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.