Versions in this module Expand all Collapse all v1 v1.0.6 Jun 25, 2021 Changes in this version + const CalcAndCheckCrc + const CheckCrc + const DontCheckCrc + const InvalidCtx + var ErrBadToken = errors.New("invalid token") + var ErrInvalidPutProgress = errors.New("invalid put progress") + var ErrPutFailed = errors.New("resumable put failed") + var ErrUnmatchedChecksum = errors.New("unmatched checksum") + func BlockCount(fsize int64) int + func MakeBaseUrl(domain, key string) (baseUrl string) + func NewUptokenClient(token string, transport http.RoundTripper) *http.Client + func SetAppName(userApp string) error + func SetSettings(v *Settings) + type BlkputRet struct + Checksum string + Crc32 uint32 + Ctx string + Host string + Offset uint32 + type Policy struct + Scope string + type PutExtra struct + CheckCrc uint32 + Crc32 uint32 + MimeType string + OnProgress func(fsize, uploaded int64) + Params map[string]string + type PutRet struct + Hash string + Key string + PersistentId string + type RputExtra struct + ChunkSize int + MimeType string + Notify func(blkIdx int, blkSize int, ret *BlkputRet) + NotifyErr func(blkIdx int, blkSize int, err error) + Params map[string]string + Progresses []BlkputRet + TryTimes int + type Settings struct + ChunkSize int + TaskQsize int + TryTimes int + Workers int + type UploadConfig struct + APIHost string + Scheme string + Transport http.RoundTripper + UpHosts []string + type Uploader struct + Conn rpc.Client + UpHosts []string + func NewUploader(zone int, cfg *UploadConfig) (p Uploader) + func NewUploaderWithoutZone(cfg *UploadConfig) (p Uploader) + func (p Uploader) Mkfile(ctx Context, uphosts []string, ret interface{}, key string, hasKey bool, ...) (err error) + func (p Uploader) Put(ctx Context, ret interface{}, uptoken, key string, data io.Reader, size int64, ...) error + func (p Uploader) PutFile(ctx Context, ret interface{}, uptoken, key, localFile string, extra *PutExtra) (err error) + func (p Uploader) PutFileWithoutKey(ctx Context, ret interface{}, uptoken, localFile string, extra *PutExtra) (err error) + func (p Uploader) PutWithoutKey(ctx Context, ret interface{}, uptoken string, data io.Reader, size int64, ...) error + func (p Uploader) ResumableBput(ctx Context, uphosts []string, ret *BlkputRet, f io.ReaderAt, ...) (err error) + func (p Uploader) Rput(ctx Context, ret interface{}, uptoken string, key string, f io.ReaderAt, ...) error + func (p Uploader) RputFile(ctx Context, ret interface{}, uptoken, key, localFile string, extra *RputExtra) (err error) + func (p Uploader) RputFileWithoutKey(ctx Context, ret interface{}, uptoken, localFile string, extra *RputExtra) (err error) + func (p Uploader) RputWithoutKey(ctx Context, ret interface{}, uptoken string, f io.ReaderAt, fsize int64, ...) error