Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotEnoughParts = errors.New("Not enough Parts")
ErrNotEnoughParts will be used when writing more than size * len(partURLs)
Functions ¶
This section is empty.
Types ¶
type CompleteMultipartUpload ¶
type CompleteMultipartUpload struct {
Part []*completeMultipartUploadPart
}
CompleteMultipartUpload is the S3 CompleteMultipartUpload body
type CompleteMultipartUploadError ¶
type CompleteMultipartUploadError struct { XMLName xml.Name `xml:"Error"` Code string Message string }
CompleteMultipartUploadError is the in-body error structure https://docs.aws.amazon.com/AmazonS3/latest/API/mpUploadComplete.html#mpUploadComplete-examples the answer contains other fields we are not using
func (*CompleteMultipartUploadError) Error ¶
func (c *CompleteMultipartUploadError) Error() string
type CompleteMultipartUploadResult ¶
CompleteMultipartUploadResult is the S3 answer to CompleteMultipartUpload request
type Multipart ¶
type Multipart struct { // CompleteURL is a presigned URL for CompleteMultipartUpload CompleteURL string // AbortURL is a presigned URL for AbortMultipartUpload AbortURL string // DeleteURL is a presigned URL for RemoveObject DeleteURL string // contains filtered or unexported fields }
Multipart represents a MultipartUpload on a S3 compatible Object Store service. It can be used as io.WriteCloser for uploading an object
func NewMultipart ¶
func NewMultipart(ctx context.Context, partURLs []string, completeURL, abortURL, deleteURL string, deadline time.Time, partSize int64) (*Multipart, error)
NewMultipart provides Multipart pointer that can be used for uploading. Data written will be split buffered on disk up to size bytes then uploaded with S3 Upload Part. Once Multipart is Closed a final call to CompleteMultipartUpload will be sent. In case of any error a call to AbortMultipartUpload will be made to cleanup all the resources
type Object ¶
type Object struct { // PutURL is a presigned URL for PutObject PutURL string // DeleteURL is a presigned URL for RemoveObject DeleteURL string // contains filtered or unexported fields }
Object represents an object on a S3 compatible Object Store service. It can be used as io.WriteCloser for uploading an object
func NewObject ¶
func NewObject(ctx context.Context, putURL, deleteURL string, deadline time.Time, size int64) (*Object, error)
NewObject opens an HTTP connection to Object Store and returns an Object pointer that can be used for uploading.
type StatusCodeError ¶
type StatusCodeError error