resumable_upload_v1_bput

package
v7.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

上传指定块的一片数据,具体数据量可根据现场环境调整,同一块的每片数据必须串行上传

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChunkInfo

type ChunkInfo = Response

返回下一片数据的上传信息

type Request

type Request struct {
	Ctx         string            // 前一次上传返回的块级上传控制信息
	ChunkOffset int64             // 当前片在整个块中的起始偏移
	UpToken     uptoken.Provider  // 上传凭证,如果为空,则使用 HTTPClientOptions 中的 UpToken
	Body        io.ReadSeekCloser // 请求体
}

调用 API 所用的请求

type Response

type Response struct {
	Ctx       string // 本次上传成功后的块级上传控制信息,用于后续上传片(bput)及创建文件(mkfile)
	Checksum  string // 上传块 SHA1 值,使用 URL 安全的 Base64 编码
	Crc32     int64  // 上传块 CRC32 值,客户可通过此字段对上传块的完整性进行校验
	Offset    int64  // 下一个上传块在切割块中的偏移
	Host      string // 后续上传接收地址
	ExpiredAt int64  // `ctx` 过期时间
}

获取 API 所用的响应

func (*Response) MarshalJSON

func (j *Response) MarshalJSON() ([]byte, error)

func (*Response) UnmarshalJSON

func (j *Response) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL