Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RemoteCallback ¶
func RemoteCallback(url string, body serializer.UploadCallback) error
RemoteCallback 发送远程存储策略上传回调请求
Types ¶
type NopRSCloser ¶
type NopRSCloser struct {
// contains filtered or unexported fields
}
NopRSCloser 实现不完整seeker
func (NopRSCloser) Read ¶
func (instance NopRSCloser) Read(p []byte) (n int, err error)
Read 实现 NopRSCloser reader
func (NopRSCloser) Seek ¶
func (instance NopRSCloser) Seek(offset int64, whence int) (int64, error)
Seek 实现 NopRSCloser seeker, 只实现seek开头/结尾以便http.ServeContent用于确定正文大小
func (NopRSCloser) SetContentLength ¶
func (instance NopRSCloser) SetContentLength(size int64)
SetContentLength 设置数据流大小
func (NopRSCloser) SetFirstFakeChunk ¶
func (instance NopRSCloser) SetFirstFakeChunk()
SetFirstFakeChunk 开启第一次read返回空数据 TODO 测试
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option 发送请求的额外设置
func WithCredential ¶
WithCredential 对请求进行签名
type Response ¶
Response 请求的响应或错误信息
func (*Response) CheckHTTPResponse ¶
CheckHTTPResponse 检查请求响应HTTP状态码
func (*Response) DecodeResponse ¶
func (resp *Response) DecodeResponse() (*serializer.Response, error)
DecodeResponse 尝试解析为serializer.Response,并对状态码进行检查
func (*Response) GetRSCloser ¶
func (resp *Response) GetRSCloser() (*NopRSCloser, error)
GetRSCloser 返回带有空seeker的RSCloser,供http.ServeContent使用
func (*Response) GetResponse ¶
GetResponse 检查响应并获取响应正文
Click to show internal directories.
Click to hide internal directories.