Documentation ¶
Index ¶
- Constants
- type SimpleUploader
- func (uploader *SimpleUploader) FileSize() int64
- func (uploader *SimpleUploader) ParallelUpload(bucket string, object string, contentType string, ...) (*api.CompleteMultipartUploadResult, error)
- func (uploader *SimpleUploader) SimplelUpload(bucket string, object string, contentType string, ...) (*api.CompleteMultipartUploadResult, error)
- func (uploader *SimpleUploader) SumCrc32() uint32
Constants ¶
View Source
const ( // DEFAULT_SERVICE_DOMAIN = bce.DEFAULT_REGION + ".bcebos.com" DEFAULT_MAX_PARALLEL = 10 MULTIPART_ALIGN = 1 << 20 // 1MB MIN_MULTIPART_SIZE = 100 * (1 << 10) // 100 KB DEFAULT_MULTIPART_SIZE = 12 * (1 << 20) // 12MB MAX_PART_NUMBER = 10000 MAX_SINGLE_PART_SIZE = 5 * (1 << 30) // 5GB MAX_SINGLE_OBJECT_SIZE = 48.8 * (1 << 40) // 48.8TB )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimpleUploader ¶
type SimpleUploader struct {
// contains filtered or unexported fields
}
func CreateSimpleUploader ¶
func (*SimpleUploader) FileSize ¶
func (uploader *SimpleUploader) FileSize() int64
func (*SimpleUploader) ParallelUpload ¶
func (uploader *SimpleUploader) ParallelUpload(bucket string, object string, contentType string, args *api.InitiateMultipartUploadArgs) (*api.CompleteMultipartUploadResult, error)
func (*SimpleUploader) SimplelUpload ¶
func (uploader *SimpleUploader) SimplelUpload(bucket string, object string, contentType string, args *api.InitiateMultipartUploadArgs) (*api.CompleteMultipartUploadResult, error)
ParallelUpload - auto multipart upload object
PARAMS:
- bucket: the bucket name
- object: the object name
- filename: the filename
- contentType: the content type default(application/octet-stream)
- args: the bucket name nil using default
RETURNS:
- *api.CompleteMultipartUploadResult: multipart upload result
- error: nil if success otherwise the specific error
func (*SimpleUploader) SumCrc32 ¶
func (uploader *SimpleUploader) SumCrc32() uint32
Click to show internal directories.
Click to hide internal directories.