Documentation ¶
Overview ¶
Package pcsupload 上传包
Index ¶
- Constants
- func NewPCSUpload(pcs *baidupcs.BaiduPCS, targetPath string) uploader.MultiUpload
- type PCSUpload
- type Uploading
- type UploadingDatabase
- func (ud *UploadingDatabase) Close() error
- func (ud *UploadingDatabase) Delete(meta *checksum.LocalFileMeta) bool
- func (ud *UploadingDatabase) Save() error
- func (ud *UploadingDatabase) Search(meta *checksum.LocalFileMeta) *uploader.InstanceState
- func (ud *UploadingDatabase) UpdateUploading(meta *checksum.LocalFileMeta, state *uploader.InstanceState)
Constants ¶
View Source
const (
UploadingFileName = "pcs_uploading.json"
)
Variables ¶
This section is empty.
Functions ¶
func NewPCSUpload ¶
func NewPCSUpload(pcs *baidupcs.BaiduPCS, targetPath string) uploader.MultiUpload
Types ¶
type PCSUpload ¶
type PCSUpload struct {
// contains filtered or unexported fields
}
func (*PCSUpload) CreateSuperFile ¶
type Uploading ¶
type Uploading struct { *checksum.LocalFileMeta State *uploader.InstanceState `json:"state"` }
Uploading 未完成上传的信息
type UploadingDatabase ¶
type UploadingDatabase struct { UploadingList []*Uploading `json:"upload_state"` Timestamp int64 `json:"timestamp"` // contains filtered or unexported fields }
UploadingDatabase 未完成上传的数据库
func NewUploadingDatabase ¶
func NewUploadingDatabase() (ud *UploadingDatabase, err error)
NewUploadingDatabase 初始化未完成上传的数据库, 从库中读取内容
func (*UploadingDatabase) Delete ¶
func (ud *UploadingDatabase) Delete(meta *checksum.LocalFileMeta) bool
Delete 删除
func (*UploadingDatabase) Search ¶
func (ud *UploadingDatabase) Search(meta *checksum.LocalFileMeta) *uploader.InstanceState
Search 搜索
func (*UploadingDatabase) UpdateUploading ¶
func (ud *UploadingDatabase) UpdateUploading(meta *checksum.LocalFileMeta, state *uploader.InstanceState)
UpdateUploading 更新正在上传
Click to show internal directories.
Click to hide internal directories.