Documentation
¶
Index ¶
- Constants
- type BaseClient
- func (c *BaseClient) GetUploadStatus(ctx context.Context, uploadSessionID string) (*UploadStatusResponse, error)
- func (c *BaseClient) InitUploadSession(ctx context.Context, req *InitUploadSessionRequest) (*InitUploadSessionResponse, error)
- func (c *BaseClient) UploadChunk(ctx context.Context, req *UploadChunkRequest) (*UploadChunkResponse, error)
- type InitUploadSessionRequest
- type InitUploadSessionResponse
- type UploadChunkRequest
- type UploadChunkResponse
- type UploadStatusResponse
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseClient ¶
func NewBaseClient ¶
func NewBaseClient(confReader config.Reader, sender whttp.AnySender) *BaseClient
func (*BaseClient) GetUploadStatus ¶
func (c *BaseClient) GetUploadStatus(ctx context.Context, uploadSessionID string) (*UploadStatusResponse, error)
func (*BaseClient) InitUploadSession ¶
func (c *BaseClient) InitUploadSession( ctx context.Context, req *InitUploadSessionRequest, ) (*InitUploadSessionResponse, error)
func (*BaseClient) UploadChunk ¶
func (c *BaseClient) UploadChunk(ctx context.Context, req *UploadChunkRequest) (*UploadChunkResponse, error)
type InitUploadSessionResponse ¶
type InitUploadSessionResponse struct {
ID string `json:"id"` // format: upload:<UPLOAD_SESSION_ID>
}
type UploadChunkRequest ¶
type UploadChunkRequest struct {
UploadSessionID string
FileOffset int64
FileReader io.ReadSeeker
}
type UploadChunkResponse ¶
type UploadChunkResponse struct {
FileHandle string `json:"h"` // "h": "uploaded file handle"
}
type UploadStatusResponse ¶
Click to show internal directories.
Click to hide internal directories.