Versions in this module Expand all Collapse all v0 v0.9.7 Mar 18, 2020 Changes in this version + const DEFAULT_MAX_PARALLEL + const DEFAULT_MULTIPART_SIZE + const DEFAULT_SERVICE_DOMAIN + const MAX_PART_NUMBER + const MAX_SINGLE_OBJECT_SIZE + const MAX_SINGLE_PART_SIZE + const MIN_MULTIPART_SIZE + const MULTIPART_ALIGN + type Client struct + MaxParallel int64 + MultipartSize int64 + func NewClient(ak, sk, endpoint string) (*Client, error) + func (c *Client) AbortMultipartUpload(bucket, object, uploadId string) error + func (c *Client) AppendObject(bucket, object string, content *bce.Body, args *api.AppendObjectArgs) (*api.AppendObjectResult, error) + func (c *Client) BasicCopyObject(bucket, object, srcBucket, srcObject string) (*api.CopyObjectResult, error) + func (c *Client) BasicFetchObject(bucket, object, source string) (*api.FetchObjectResult, error) + func (c *Client) BasicGeneratePresignedUrl(bucket, object string, expireInSeconds int) string + func (c *Client) BasicGetObject(bucket, object string) (*api.GetObjectResult, error) + func (c *Client) BasicGetObjectToFile(bucket, object, filePath string) error + func (c *Client) BasicInitiateMultipartUpload(bucket, object string) (*api.InitiateMultipartUploadResult, error) + func (c *Client) BasicListMultipartUploads(bucket string) (*api.ListMultipartUploadsResult, error) + func (c *Client) BasicListParts(bucket, object, uploadId string) (*api.ListPartsResult, error) + func (c *Client) BasicPutObject(bucket, object string, body *bce.Body) (string, error) + func (c *Client) BasicUploadPart(bucket, object, uploadId string, partNumber int, content *bce.Body) (string, error) + func (c *Client) BasicUploadPartCopy(bucket, object, srcBucket, srcObject, uploadId string, partNumber int) (*api.CopyObjectResult, error) + func (c *Client) CompleteMultipartUpload(bucket, object, uploadId string, body *bce.Body, ...) (*api.CompleteMultipartUploadResult, error) + func (c *Client) CompleteMultipartUploadFromStruct(bucket, object, uploadId string, args *api.CompleteMultipartUploadArgs) (*api.CompleteMultipartUploadResult, error) + func (c *Client) CopyObject(bucket, object, srcBucket, srcObject string, args *api.CopyObjectArgs) (*api.CopyObjectResult, error) + func (c *Client) DeleteBucket(bucket string) error + func (c *Client) DeleteBucketCopyrightProtection(bucket string) error + func (c *Client) DeleteBucketCors(bucket string) error + func (c *Client) DeleteBucketEncryption(bucket string) error + func (c *Client) DeleteBucketLifecycle(bucket string) error + func (c *Client) DeleteBucketLogging(bucket string) error + func (c *Client) DeleteBucketNotification(bucket string) error + func (c *Client) DeleteBucketReplication(bucket string) error + func (c *Client) DeleteBucketStaticWebsite(bucket string) error + func (c *Client) DeleteBucketTrash(bucket string) error + func (c *Client) DeleteMultipleObjects(bucket string, objectListStream *bce.Body) (*api.DeleteMultipleObjectsResult, error) + func (c *Client) DeleteMultipleObjectsFromKeyList(bucket string, keyList []string) (*api.DeleteMultipleObjectsResult, error) + func (c *Client) DeleteMultipleObjectsFromString(bucket, objectListString string) (*api.DeleteMultipleObjectsResult, error) + func (c *Client) DeleteMultipleObjectsFromStruct(bucket string, objectListStruct *api.DeleteMultipleObjectsArgs) (*api.DeleteMultipleObjectsResult, error) + func (c *Client) DeleteObject(bucket, object string) error + func (c *Client) DeleteObjectAcl(bucket, object string) error + func (c *Client) DoesBucketExist(bucket string) (bool, error) + func (c *Client) DownloadSuperFile(bucket, object, fileName string) (err error) + func (c *Client) FetchObject(bucket, object, source string, args *api.FetchObjectArgs) (*api.FetchObjectResult, error) + func (c *Client) GeneratePresignedUrl(bucket, object string, expireInSeconds int, method string, ...) string + func (c *Client) GetBucketAcl(bucket string) (*api.GetBucketAclResult, error) + func (c *Client) GetBucketCopyrightProtection(bucket string) ([]string, error) + func (c *Client) GetBucketCors(bucket string) (*api.GetBucketCorsResult, error) + func (c *Client) GetBucketEncryption(bucket string) (string, error) + func (c *Client) GetBucketLifecycle(bucket string) (*api.GetBucketLifecycleResult, error) + func (c *Client) GetBucketLocation(bucket string) (string, error) + func (c *Client) GetBucketLogging(bucket string) (*api.GetBucketLoggingResult, error) + func (c *Client) GetBucketNotification(bucket string) (*api.PutBucketNotificationReq, error) + func (c *Client) GetBucketReplication(bucket string) (*api.GetBucketReplicationResult, error) + func (c *Client) GetBucketReplicationProgress(bucket string) (*api.GetBucketReplicationProgressResult, error) + func (c *Client) GetBucketStaticWebsite(bucket string) (*api.GetBucketStaticWebsiteResult, error) + func (c *Client) GetBucketStorageclass(bucket string) (string, error) + func (c *Client) GetBucketTrash(bucket string) (*api.GetBucketTrashResult, error) + func (c *Client) GetObject(bucket, object string, responseHeaders map[string]string, ranges ...int64) (*api.GetObjectResult, error) + func (c *Client) GetObjectAcl(bucket, object string) (*api.GetObjectAclResult, error) + func (c *Client) GetObjectMeta(bucket, object string) (*api.GetObjectMetaResult, error) + func (c *Client) HeadBucket(bucket string) error + func (c *Client) InitiateMultipartUpload(bucket, object, contentType string, args *api.InitiateMultipartUploadArgs) (*api.InitiateMultipartUploadResult, error) + func (c *Client) ListBuckets() (*api.ListBucketsResult, error) + func (c *Client) ListMultipartUploads(bucket string, args *api.ListMultipartUploadsArgs) (*api.ListMultipartUploadsResult, error) + func (c *Client) ListObjects(bucket string, args *api.ListObjectsArgs) (*api.ListObjectsResult, error) + func (c *Client) ListParts(bucket, object, uploadId string, args *api.ListPartsArgs) (*api.ListPartsResult, error) + func (c *Client) ParallelCopy(srcBucketName string, srcObjectName string, destBucketName string, ...) (*api.CompleteMultipartUploadResult, error) + func (c *Client) ParallelUpload(bucket string, object string, filename string, contentType string, ...) (*api.CompleteMultipartUploadResult, error) + func (c *Client) PutBucket(bucket string) (string, error) + func (c *Client) PutBucketAcl(bucket string, aclBody *bce.Body) error + func (c *Client) PutBucketAclFromCanned(bucket, cannedAcl string) error + func (c *Client) PutBucketAclFromFile(bucket, aclFile string) error + func (c *Client) PutBucketAclFromString(bucket, aclString string) error + func (c *Client) PutBucketAclFromStruct(bucket string, aclObj *api.PutBucketAclArgs) error + func (c *Client) PutBucketCopyrightProtection(bucket string, resources ...string) error + func (c *Client) PutBucketCors(bucket string, config *bce.Body) error + func (c *Client) PutBucketCorsFromFile(bucket, filename string) error + func (c *Client) PutBucketCorsFromString(bucket, jsonConfig string) error + func (c *Client) PutBucketCorsFromStruct(bucket string, confObj *api.PutBucketCorsArgs) error + func (c *Client) PutBucketEncryption(bucket, algorithm string) error + func (c *Client) PutBucketLifecycle(bucket string, lifecycle *bce.Body) error + func (c *Client) PutBucketLifecycleFromString(bucket, lifecycle string) error + func (c *Client) PutBucketLogging(bucket string, body *bce.Body) error + func (c *Client) PutBucketLoggingFromString(bucket, logging string) error + func (c *Client) PutBucketLoggingFromStruct(bucket string, obj *api.PutBucketLoggingArgs) error + func (c *Client) PutBucketNotification(bucket string, putBucketNotificationReq api.PutBucketNotificationReq) error + func (c *Client) PutBucketReplication(bucket string, replicationConf *bce.Body) error + func (c *Client) PutBucketReplicationFromFile(bucket, confFile string) error + func (c *Client) PutBucketReplicationFromString(bucket, confString string) error + func (c *Client) PutBucketReplicationFromStruct(bucket string, confObj *api.PutBucketReplicationArgs) error + func (c *Client) PutBucketStaticWebsite(bucket string, config *bce.Body) error + func (c *Client) PutBucketStaticWebsiteFromString(bucket, jsonConfig string) error + func (c *Client) PutBucketStaticWebsiteFromStruct(bucket string, confObj *api.PutBucketStaticWebsiteArgs) error + func (c *Client) PutBucketStorageclass(bucket, storageClass string) error + func (c *Client) PutBucketTrash(bucket string, trashReq api.PutBucketTrashReq) error + func (c *Client) PutObject(bucket, object string, body *bce.Body, args *api.PutObjectArgs) (string, error) + func (c *Client) PutObjectAcl(bucket, object string, aclBody *bce.Body) error + func (c *Client) PutObjectAclFromCanned(bucket, object, cannedAcl string) error + func (c *Client) PutObjectAclFromFile(bucket, object, aclFile string) error + func (c *Client) PutObjectAclFromString(bucket, object, aclString string) error + func (c *Client) PutObjectAclFromStruct(bucket, object string, aclObj *api.PutObjectAclArgs) error + func (c *Client) PutObjectAclGrantFullControl(bucket, object string, ids ...string) error + func (c *Client) PutObjectAclGrantRead(bucket, object string, ids ...string) error + func (c *Client) PutObjectFromBytes(bucket, object string, bytesArr []byte, args *api.PutObjectArgs) (string, error) + func (c *Client) PutObjectFromFile(bucket, object, fileName string, args *api.PutObjectArgs) (string, error) + func (c *Client) PutObjectFromString(bucket, object, content string, args *api.PutObjectArgs) (string, error) + func (c *Client) RestoreObject(bucket string, object string, restoreDays int, restoreTier string) error + func (c *Client) SelectObject(bucket, object string, args *api.SelectObjectArgs) (*api.SelectObjectResult, error) + func (c *Client) SimpleAppendObject(bucket, object string, content *bce.Body, offset int64) (*api.AppendObjectResult, error) + func (c *Client) SimpleAppendObjectFromFile(bucket, object, filePath string, offset int64) (*api.AppendObjectResult, error) + func (c *Client) SimpleAppendObjectFromString(bucket, object, content string, offset int64) (*api.AppendObjectResult, error) + func (c *Client) SimpleFetchObject(bucket, object, source, mode, storageClass string) (*api.FetchObjectResult, error) + func (c *Client) SimpleListObjects(bucket, prefix string, maxKeys int, marker, delimiter string) (*api.ListObjectsResult, error) + func (c *Client) SimplePutBucketStaticWebsite(bucket, index, notFound string) error + func (c *Client) UploadPart(bucket, object, uploadId string, partNumber int, content *bce.Body, ...) (string, error) + func (c *Client) UploadPartCopy(bucket, object, srcBucket, srcObject, uploadId string, partNumber int, ...) (*api.CopyObjectResult, error) + func (c *Client) UploadSuperFile(bucket, object, fileName, storageClass string) error