Created
October 28, 2016 11:13
-
-
Save Acconut/197bf36d32ac4fd646b83e208bf97131 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type UploadURL *net.URL | |
type UploadInfo struct { | |
Size int64 | |
Offset int64 | |
Metadata map[string]string | |
IsPartial bool | |
IsFinal bool | |
PartialUploads []string | |
} | |
func CreateUpload(endpoint *net.URL, info UploadInfo) (UploadURL, error) | |
func ResumeUpload(uploadURL *net.URL) (UploadURL, error) | |
func (u *UploadURL) Terminate() error | |
func (u *UploadURL) Info() (UploadInfo, error) | |
func (u *UploadURL) UploadChunk(offset int64, src io.Reader) (newOffset int64, error) | |
func UploadFile(endpoint *net.URL, info UploadInfo, src io.ReadSeeker) (UploadURL, error) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment