Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type UploadStatus ¶
UploadStatus 上传状态
type Uploader ¶
type Uploader struct { URL string // 上传地址 Reader *reader // 要上传的对象 // contains filtered or unexported fields }
Uploader 上传
func NewUploader ¶
func NewUploader(url string, uploadReader io.Reader, size int64, h *requester.HTTPClient) (uploader *Uploader)
NewUploader 返回 uploader 对象, url: 上传地址, uploadReader: 实现 io.Reader 接口的对象, 例如文件
func (*Uploader) GetStatusChan ¶
func (u *Uploader) GetStatusChan() <-chan UploadStatus
GetStatusChan 返回 UploadStatus 对象的 channel
Click to show internal directories.
Click to hide internal directories.