Documentation ¶
Index ¶
- Constants
- func CRC64Combine(crc1 uint64, crc2 uint64, len2 uint64) uint64
- func DirExists(dir string) bool
- func EmptyFile(filename string) bool
- func FileExists(filename string) bool
- func GetReaderLen(r io.Reader) int64
- func NewCRC64(init uint64) hash.Hash64
- func NewLimitedReadCloser(rc io.ReadCloser, limit int64) io.ReadCloser
- func NewProgress(pr ProgressFunc, total int64) io.Writer
- func OpReadWriteTimeout(value time.Duration) func(*Options)
- func ParseContentRange(s string) (from int64, to int64, total int64, err error)
- func ParseOffsetAndSizeFromHeaders(headers http.Header) (offset, size int64)
- func PresignExpiration(value time.Time) func(*PresignOptions)
- func PresignExpires(value time.Duration) func(*PresignOptions)
- func Ptr[T any](v T) *T
- func SliceOfPtrs[T any](vv ...T) []*T
- func TeeReadNopCloser(reader io.Reader, writers ...io.Writer) io.ReadCloser
- func ToBool(p *bool) (v bool)
- func ToDuration(p *time.Duration) (v time.Duration)
- func ToInt(p *int) (v int)
- func ToInt64(p *int64) (v int64)
- func ToLogLevel(s string) int
- func ToString(p *string) (v string)
- func ToTime(p *time.Time) (v time.Time)
- func TypeByExtension(filePath string) string
- func Version() string
- type AbortBucketWormRequest
- type AbortBucketWormResult
- type AbortMultipartUploadRequest
- type AbortMultipartUploadResult
- type AccessMonitorConfiguration
- type AccessMonitorStatusType
- type AccessPoint
- type AccessPointVpcConfiguration
- type AppendFileAPIClient
- type AppendObjectRequest
- type AppendObjectResult
- type AppendOnlyFile
- type AppendOptions
- type ApplyServerSideEncryptionByDefault
- type ArchiveDirectReadConfiguration
- type AsyncProcessObjectRequest
- type AsyncProcessObjectResult
- type AsyncRangeReader
- type AuthMethodType
- type BucketACLType
- type BucketCnameConfiguration
- type BucketInfo
- type BucketLoggingStatus
- type BucketPolicy
- type BucketProperties
- type BucketResourceGroupConfiguration
- type BucketWormStateType
- type BwTokenBucket
- type BwTokenBuckets
- type CORSConfiguration
- type CORSRule
- type CSVSelectInput
- type CSVSelectOutput
- type CanceledError
- type CertificateConfiguration
- type Client
- func (c *Client) AbortBucketWorm(ctx context.Context, request *AbortBucketWormRequest, optFns ...func(*Options)) (*AbortBucketWormResult, error)
- func (c *Client) AbortMultipartUpload(ctx context.Context, request *AbortMultipartUploadRequest, ...) (*AbortMultipartUploadResult, error)
- func (c *Client) AppendFile(ctx context.Context, bucket string, key string, optFns ...func(*AppendOptions)) (*AppendOnlyFile, error)
- func (c *Client) AppendObject(ctx context.Context, request *AppendObjectRequest, optFns ...func(*Options)) (*AppendObjectResult, error)
- func (c *Client) AsyncProcessObject(ctx context.Context, request *AsyncProcessObjectRequest, ...) (*AsyncProcessObjectResult, error)
- func (c *Client) CloseMetaQuery(ctx context.Context, request *CloseMetaQueryRequest, optFns ...func(*Options)) (*CloseMetaQueryResult, error)
- func (c *Client) CompleteBucketWorm(ctx context.Context, request *CompleteBucketWormRequest, ...) (*CompleteBucketWormResult, error)
- func (c *Client) CompleteMultipartUpload(ctx context.Context, request *CompleteMultipartUploadRequest, ...) (*CompleteMultipartUploadResult, error)
- func (c *Client) CopyObject(ctx context.Context, request *CopyObjectRequest, optFns ...func(*Options)) (*CopyObjectResult, error)
- func (c *Client) CreateAccessPoint(ctx context.Context, request *CreateAccessPointRequest, ...) (*CreateAccessPointResult, error)
- func (c *Client) CreateCnameToken(ctx context.Context, request *CreateCnameTokenRequest, ...) (*CreateCnameTokenResult, error)
- func (c *Client) CreateSelectObjectMeta(ctx context.Context, request *CreateSelectObjectMetaRequest, ...) (*CreateSelectObjectMetaResult, error)
- func (c *Client) DeleteAccessPoint(ctx context.Context, request *DeleteAccessPointRequest, ...) (*DeleteAccessPointResult, error)
- func (c *Client) DeleteAccessPointPolicy(ctx context.Context, request *DeleteAccessPointPolicyRequest, ...) (*DeleteAccessPointPolicyResult, error)
- func (c *Client) DeleteAccessPointPublicAccessBlock(ctx context.Context, request *DeleteAccessPointPublicAccessBlockRequest, ...) (*DeleteAccessPointPublicAccessBlockResult, error)
- func (c *Client) DeleteBucket(ctx context.Context, request *DeleteBucketRequest, optFns ...func(*Options)) (*DeleteBucketResult, error)
- func (c *Client) DeleteBucketCors(ctx context.Context, request *DeleteBucketCorsRequest, ...) (*DeleteBucketCorsResult, error)
- func (c *Client) DeleteBucketEncryption(ctx context.Context, request *DeleteBucketEncryptionRequest, ...) (*DeleteBucketEncryptionResult, error)
- func (c *Client) DeleteBucketInventory(ctx context.Context, request *DeleteBucketInventoryRequest, ...) (*DeleteBucketInventoryResult, error)
- func (c *Client) DeleteBucketLifecycle(ctx context.Context, request *DeleteBucketLifecycleRequest, ...) (*DeleteBucketLifecycleResult, error)
- func (c *Client) DeleteBucketLogging(ctx context.Context, request *DeleteBucketLoggingRequest, ...) (*DeleteBucketLoggingResult, error)
- func (c *Client) DeleteBucketPolicy(ctx context.Context, request *DeleteBucketPolicyRequest, ...) (*DeleteBucketPolicyResult, error)
- func (c *Client) DeleteBucketPublicAccessBlock(ctx context.Context, request *DeleteBucketPublicAccessBlockRequest, ...) (*DeleteBucketPublicAccessBlockResult, error)
- func (c *Client) DeleteBucketReplication(ctx context.Context, request *DeleteBucketReplicationRequest, ...) (*DeleteBucketReplicationResult, error)
- func (c *Client) DeleteBucketTags(ctx context.Context, request *DeleteBucketTagsRequest, ...) (*DeleteBucketTagsResult, error)
- func (c *Client) DeleteBucketWebsite(ctx context.Context, request *DeleteBucketWebsiteRequest, ...) (*DeleteBucketWebsiteResult, error)
- func (c *Client) DeleteCname(ctx context.Context, request *DeleteCnameRequest, optFns ...func(*Options)) (*DeleteCnameResult, error)
- func (c *Client) DeleteMultipleObjects(ctx context.Context, request *DeleteMultipleObjectsRequest, ...) (*DeleteMultipleObjectsResult, error)
- func (c *Client) DeleteObject(ctx context.Context, request *DeleteObjectRequest, optFns ...func(*Options)) (*DeleteObjectResult, error)
- func (c *Client) DeleteObjectTagging(ctx context.Context, request *DeleteObjectTaggingRequest, ...) (*DeleteObjectTaggingResult, error)
- func (c *Client) DeletePublicAccessBlock(ctx context.Context, request *DeletePublicAccessBlockRequest, ...) (*DeletePublicAccessBlockResult, error)
- func (c *Client) DeleteStyle(ctx context.Context, request *DeleteStyleRequest, optFns ...func(*Options)) (*DeleteStyleResult, error)
- func (c *Client) DeleteUserDefinedLogFieldsConfig(ctx context.Context, request *DeleteUserDefinedLogFieldsConfigRequest, ...) (*DeleteUserDefinedLogFieldsConfigResult, error)
- func (c *Client) DoMetaQuery(ctx context.Context, request *DoMetaQueryRequest, optFns ...func(*Options)) (*DoMetaQueryResult, error)
- func (c *Client) ExtendBucketWorm(ctx context.Context, request *ExtendBucketWormRequest, ...) (*ExtendBucketWormResult, error)
- func (c *Client) GetAccessPoint(ctx context.Context, request *GetAccessPointRequest, optFns ...func(*Options)) (*GetAccessPointResult, error)
- func (c *Client) GetAccessPointPolicy(ctx context.Context, request *GetAccessPointPolicyRequest, ...) (*GetAccessPointPolicyResult, error)
- func (c *Client) GetAccessPointPublicAccessBlock(ctx context.Context, request *GetAccessPointPublicAccessBlockRequest, ...) (*GetAccessPointPublicAccessBlockResult, error)
- func (c *Client) GetBucketAccessMonitor(ctx context.Context, request *GetBucketAccessMonitorRequest, ...) (*GetBucketAccessMonitorResult, error)
- func (c *Client) GetBucketAcl(ctx context.Context, request *GetBucketAclRequest, optFns ...func(*Options)) (*GetBucketAclResult, error)
- func (c *Client) GetBucketArchiveDirectRead(ctx context.Context, request *GetBucketArchiveDirectReadRequest, ...) (*GetBucketArchiveDirectReadResult, error)
- func (c *Client) GetBucketCors(ctx context.Context, request *GetBucketCorsRequest, optFns ...func(*Options)) (*GetBucketCorsResult, error)
- func (c *Client) GetBucketEncryption(ctx context.Context, request *GetBucketEncryptionRequest, ...) (*GetBucketEncryptionResult, error)
- func (c *Client) GetBucketHttpsConfig(ctx context.Context, request *GetBucketHttpsConfigRequest, ...) (*GetBucketHttpsConfigResult, error)
- func (c *Client) GetBucketInfo(ctx context.Context, request *GetBucketInfoRequest, optFns ...func(*Options)) (*GetBucketInfoResult, error)
- func (c *Client) GetBucketInventory(ctx context.Context, request *GetBucketInventoryRequest, ...) (*GetBucketInventoryResult, error)
- func (c *Client) GetBucketLifecycle(ctx context.Context, request *GetBucketLifecycleRequest, ...) (*GetBucketLifecycleResult, error)
- func (c *Client) GetBucketLocation(ctx context.Context, request *GetBucketLocationRequest, ...) (*GetBucketLocationResult, error)
- func (c *Client) GetBucketLogging(ctx context.Context, request *GetBucketLoggingRequest, ...) (*GetBucketLoggingResult, error)
- func (c *Client) GetBucketPolicy(ctx context.Context, request *GetBucketPolicyRequest, optFns ...func(*Options)) (*GetBucketPolicyResult, error)
- func (c *Client) GetBucketPolicyStatus(ctx context.Context, request *GetBucketPolicyStatusRequest, ...) (*GetBucketPolicyStatusResult, error)
- func (c *Client) GetBucketPublicAccessBlock(ctx context.Context, request *GetBucketPublicAccessBlockRequest, ...) (*GetBucketPublicAccessBlockResult, error)
- func (c *Client) GetBucketReferer(ctx context.Context, request *GetBucketRefererRequest, ...) (*GetBucketRefererResult, error)
- func (c *Client) GetBucketReplication(ctx context.Context, request *GetBucketReplicationRequest, ...) (*GetBucketReplicationResult, error)
- func (c *Client) GetBucketReplicationLocation(ctx context.Context, request *GetBucketReplicationLocationRequest, ...) (*GetBucketReplicationLocationResult, error)
- func (c *Client) GetBucketReplicationProgress(ctx context.Context, request *GetBucketReplicationProgressRequest, ...) (*GetBucketReplicationProgressResult, error)
- func (c *Client) GetBucketRequestPayment(ctx context.Context, request *GetBucketRequestPaymentRequest, ...) (*GetBucketRequestPaymentResult, error)
- func (c *Client) GetBucketResourceGroup(ctx context.Context, request *GetBucketResourceGroupRequest, ...) (*GetBucketResourceGroupResult, error)
- func (c *Client) GetBucketStat(ctx context.Context, request *GetBucketStatRequest, optFns ...func(*Options)) (*GetBucketStatResult, error)
- func (c *Client) GetBucketTags(ctx context.Context, request *GetBucketTagsRequest, optFns ...func(*Options)) (*GetBucketTagsResult, error)
- func (c *Client) GetBucketTransferAcceleration(ctx context.Context, request *GetBucketTransferAccelerationRequest, ...) (*GetBucketTransferAccelerationResult, error)
- func (c *Client) GetBucketVersioning(ctx context.Context, request *GetBucketVersioningRequest, ...) (*GetBucketVersioningResult, error)
- func (c *Client) GetBucketWebsite(ctx context.Context, request *GetBucketWebsiteRequest, ...) (*GetBucketWebsiteResult, error)
- func (c *Client) GetBucketWorm(ctx context.Context, request *GetBucketWormRequest, optFns ...func(*Options)) (*GetBucketWormResult, error)
- func (c *Client) GetCnameToken(ctx context.Context, request *GetCnameTokenRequest, optFns ...func(*Options)) (*GetCnameTokenResult, error)
- func (c *Client) GetMetaQueryStatus(ctx context.Context, request *GetMetaQueryStatusRequest, ...) (*GetMetaQueryStatusResult, error)
- func (c *Client) GetObject(ctx context.Context, request *GetObjectRequest, optFns ...func(*Options)) (*GetObjectResult, error)
- func (c *Client) GetObjectAcl(ctx context.Context, request *GetObjectAclRequest, optFns ...func(*Options)) (*GetObjectAclResult, error)
- func (c *Client) GetObjectMeta(ctx context.Context, request *GetObjectMetaRequest, optFns ...func(*Options)) (*GetObjectMetaResult, error)
- func (c *Client) GetObjectTagging(ctx context.Context, request *GetObjectTaggingRequest, ...) (*GetObjectTaggingResult, error)
- func (c *Client) GetObjectToFile(ctx context.Context, request *GetObjectRequest, filePath string, ...) (*GetObjectResult, error)
- func (c *Client) GetPublicAccessBlock(ctx context.Context, request *GetPublicAccessBlockRequest, ...) (*GetPublicAccessBlockResult, error)
- func (c *Client) GetStyle(ctx context.Context, request *GetStyleRequest, optFns ...func(*Options)) (*GetStyleResult, error)
- func (c *Client) GetSymlink(ctx context.Context, request *GetSymlinkRequest, optFns ...func(*Options)) (*GetSymlinkResult, error)
- func (c *Client) GetUserDefinedLogFieldsConfig(ctx context.Context, request *GetUserDefinedLogFieldsConfigRequest, ...) (*GetUserDefinedLogFieldsConfigResult, error)
- func (c *Client) HeadObject(ctx context.Context, request *HeadObjectRequest, optFns ...func(*Options)) (*HeadObjectResult, error)
- func (c *Client) InitiateBucketWorm(ctx context.Context, request *InitiateBucketWormRequest, ...) (*InitiateBucketWormResult, error)
- func (c *Client) InitiateMultipartUpload(ctx context.Context, request *InitiateMultipartUploadRequest, ...) (*InitiateMultipartUploadResult, error)
- func (c *Client) InvokeOperation(ctx context.Context, input *OperationInput, optFns ...func(*Options)) (*OperationOutput, error)
- func (c *Client) IsBucketExist(ctx context.Context, bucket string, optFns ...func(*Options)) (bool, error)
- func (c *Client) IsObjectExist(ctx context.Context, bucket string, key string, ...) (bool, error)
- func (c *Client) ListAccessPoints(ctx context.Context, request *ListAccessPointsRequest, ...) (*ListAccessPointsResult, error)
- func (c *Client) ListBucketInventory(ctx context.Context, request *ListBucketInventoryRequest, ...) (*ListBucketInventoryResult, error)
- func (c *Client) ListBuckets(ctx context.Context, request *ListBucketsRequest, optFns ...func(*Options)) (*ListBucketsResult, error)
- func (c *Client) ListCname(ctx context.Context, request *ListCnameRequest, optFns ...func(*Options)) (*ListCnameResult, error)
- func (c *Client) ListMultipartUploads(ctx context.Context, request *ListMultipartUploadsRequest, ...) (*ListMultipartUploadsResult, error)
- func (c *Client) ListObjectVersions(ctx context.Context, request *ListObjectVersionsRequest, ...) (*ListObjectVersionsResult, error)
- func (c *Client) ListObjects(ctx context.Context, request *ListObjectsRequest, optFns ...func(*Options)) (*ListObjectsResult, error)
- func (c *Client) ListObjectsV2(ctx context.Context, request *ListObjectsV2Request, optFns ...func(*Options)) (*ListObjectsV2Result, error)
- func (c *Client) ListParts(ctx context.Context, request *ListPartsRequest, optFns ...func(*Options)) (*ListPartsResult, error)
- func (c *Client) ListStyle(ctx context.Context, request *ListStyleRequest, optFns ...func(*Options)) (*ListStyleResult, error)
- func (c *Client) NewCopier(optFns ...func(*CopierOptions)) *Copier
- func (c *Client) NewDownloader(optFns ...func(*DownloaderOptions)) *Downloader
- func (c *Client) NewListBucketsPaginator(request *ListBucketsRequest, optFns ...func(*PaginatorOptions)) *ListBucketsPaginator
- func (c *Client) NewListMultipartUploadsPaginator(request *ListMultipartUploadsRequest, optFns ...func(*PaginatorOptions)) *ListMultipartUploadsPaginator
- func (c *Client) NewListObjectVersionsPaginator(request *ListObjectVersionsRequest, optFns ...func(*PaginatorOptions)) *ListObjectVersionsPaginator
- func (c *Client) NewListObjectsPaginator(request *ListObjectsRequest, optFns ...func(*PaginatorOptions)) *ListObjectsPaginator
- func (c *Client) NewListObjectsV2Paginator(request *ListObjectsV2Request, optFns ...func(*PaginatorOptions)) *ListObjectsV2Paginator
- func (c *Client) NewListPartsPaginator(request *ListPartsRequest, optFns ...func(*PaginatorOptions)) *ListPartsPaginator
- func (c *Client) NewUploader(optFns ...func(*UploaderOptions)) *Uploader
- func (c *Client) OpenFile(ctx context.Context, bucket string, key string, optFns ...func(*OpenOptions)) (*ReadOnlyFile, error)
- func (c *Client) OpenMetaQuery(ctx context.Context, request *OpenMetaQueryRequest, optFns ...func(*Options)) (*OpenMetaQueryResult, error)
- func (c *Client) OptionObject(ctx context.Context, request *OptionObjectRequest, optFns ...func(*Options)) (*OptionObjectResult, error)
- func (c *Client) Presign(ctx context.Context, request any, optFns ...func(*PresignOptions)) (*PresignResult, error)
- func (c *Client) ProcessObject(ctx context.Context, request *ProcessObjectRequest, optFns ...func(*Options)) (*ProcessObjectResult, error)
- func (c *Client) PutAccessPointPolicy(ctx context.Context, request *PutAccessPointPolicyRequest, ...) (*PutAccessPointPolicyResult, error)
- func (c *Client) PutAccessPointPublicAccessBlock(ctx context.Context, request *PutAccessPointPublicAccessBlockRequest, ...) (*PutAccessPointPublicAccessBlockResult, error)
- func (c *Client) PutBucket(ctx context.Context, request *PutBucketRequest, optFns ...func(*Options)) (*PutBucketResult, error)
- func (c *Client) PutBucketAccessMonitor(ctx context.Context, request *PutBucketAccessMonitorRequest, ...) (*PutBucketAccessMonitorResult, error)
- func (c *Client) PutBucketAcl(ctx context.Context, request *PutBucketAclRequest, optFns ...func(*Options)) (*PutBucketAclResult, error)
- func (c *Client) PutBucketArchiveDirectRead(ctx context.Context, request *PutBucketArchiveDirectReadRequest, ...) (*PutBucketArchiveDirectReadResult, error)
- func (c *Client) PutBucketCors(ctx context.Context, request *PutBucketCorsRequest, optFns ...func(*Options)) (*PutBucketCorsResult, error)
- func (c *Client) PutBucketEncryption(ctx context.Context, request *PutBucketEncryptionRequest, ...) (*PutBucketEncryptionResult, error)
- func (c *Client) PutBucketHttpsConfig(ctx context.Context, request *PutBucketHttpsConfigRequest, ...) (*PutBucketHttpsConfigResult, error)
- func (c *Client) PutBucketInventory(ctx context.Context, request *PutBucketInventoryRequest, ...) (*PutBucketInventoryResult, error)
- func (c *Client) PutBucketLifecycle(ctx context.Context, request *PutBucketLifecycleRequest, ...) (*PutBucketLifecycleResult, error)
- func (c *Client) PutBucketLogging(ctx context.Context, request *PutBucketLoggingRequest, ...) (*PutBucketLoggingResult, error)
- func (c *Client) PutBucketPolicy(ctx context.Context, request *PutBucketPolicyRequest, optFns ...func(*Options)) (*PutBucketPolicyResult, error)
- func (c *Client) PutBucketPublicAccessBlock(ctx context.Context, request *PutBucketPublicAccessBlockRequest, ...) (*PutBucketPublicAccessBlockResult, error)
- func (c *Client) PutBucketReferer(ctx context.Context, request *PutBucketRefererRequest, ...) (*PutBucketRefererResult, error)
- func (c *Client) PutBucketReplication(ctx context.Context, request *PutBucketReplicationRequest, ...) (*PutBucketReplicationResult, error)
- func (c *Client) PutBucketRequestPayment(ctx context.Context, request *PutBucketRequestPaymentRequest, ...) (*PutBucketRequestPaymentResult, error)
- func (c *Client) PutBucketResourceGroup(ctx context.Context, request *PutBucketResourceGroupRequest, ...) (*PutBucketResourceGroupResult, error)
- func (c *Client) PutBucketRtc(ctx context.Context, request *PutBucketRtcRequest, optFns ...func(*Options)) (*PutBucketRtcResult, error)
- func (c *Client) PutBucketTags(ctx context.Context, request *PutBucketTagsRequest, optFns ...func(*Options)) (*PutBucketTagsResult, error)
- func (c *Client) PutBucketTransferAcceleration(ctx context.Context, request *PutBucketTransferAccelerationRequest, ...) (*PutBucketTransferAccelerationResult, error)
- func (c *Client) PutBucketVersioning(ctx context.Context, request *PutBucketVersioningRequest, ...) (*PutBucketVersioningResult, error)
- func (c *Client) PutBucketWebsite(ctx context.Context, request *PutBucketWebsiteRequest, ...) (*PutBucketWebsiteResult, error)
- func (c *Client) PutCname(ctx context.Context, request *PutCnameRequest, optFns ...func(*Options)) (*PutCnameResult, error)
- func (c *Client) PutObject(ctx context.Context, request *PutObjectRequest, optFns ...func(*Options)) (*PutObjectResult, error)
- func (c *Client) PutObjectAcl(ctx context.Context, request *PutObjectAclRequest, optFns ...func(*Options)) (*PutObjectAclResult, error)
- func (c *Client) PutObjectFromFile(ctx context.Context, request *PutObjectRequest, filePath string, ...) (*PutObjectResult, error)
- func (c *Client) PutObjectTagging(ctx context.Context, request *PutObjectTaggingRequest, ...) (*PutObjectTaggingResult, error)
- func (c *Client) PutPublicAccessBlock(ctx context.Context, request *PutPublicAccessBlockRequest, ...) (*PutPublicAccessBlockResult, error)
- func (c *Client) PutStyle(ctx context.Context, request *PutStyleRequest, optFns ...func(*Options)) (*PutStyleResult, error)
- func (c *Client) PutSymlink(ctx context.Context, request *PutSymlinkRequest, optFns ...func(*Options)) (*PutSymlinkResult, error)
- func (c *Client) PutUserDefinedLogFieldsConfig(ctx context.Context, request *PutUserDefinedLogFieldsConfigRequest, ...) (*PutUserDefinedLogFieldsConfigResult, error)
- func (c *Client) RestoreObject(ctx context.Context, request *RestoreObjectRequest, optFns ...func(*Options)) (*RestoreObjectResult, error)
- func (c *Client) SelectObject(ctx context.Context, request *SelectObjectRequest, optFns ...func(*Options)) (*SelectObjectResult, error)
- func (c *Client) UploadPart(ctx context.Context, request *UploadPartRequest, optFns ...func(*Options)) (*UploadPartResult, error)
- func (c *Client) UploadPartCopy(ctx context.Context, request *UploadPartCopyRequest, optFns ...func(*Options)) (*UploadPartCopyResult, error)
- type ClientError
- type CloseMetaQueryRequest
- type CloseMetaQueryResult
- type CnameCertificate
- type CnameInfo
- type CnameToken
- type CommonPrefix
- type CompleteBucketWormRequest
- type CompleteBucketWormResult
- type CompleteMultipartUpload
- type CompleteMultipartUploadRequest
- type CompleteMultipartUploadResult
- type Config
- func (c Config) Copy() Config
- func (c *Config) WithAdditionalHeaders(value []string) *Config
- func (c *Config) WithConnectTimeout(value time.Duration) *Config
- func (c *Config) WithCredentialsProvider(provider credentials.CredentialsProvider) *Config
- func (c *Config) WithDisableDownloadCRC64Check(value bool) *Config
- func (c *Config) WithDisableSSL(value bool) *Config
- func (c *Config) WithDisableUploadCRC64Check(value bool) *Config
- func (c *Config) WithDownloadBandwidthlimit(value int64) *Config
- func (c *Config) WithEnabledRedirect(value bool) *Config
- func (c *Config) WithEndpoint(endpoint string) *Config
- func (c *Config) WithHttpClient(client *http.Client) *Config
- func (c *Config) WithInsecureSkipVerify(value bool) *Config
- func (c *Config) WithLogLevel(level int) *Config
- func (c *Config) WithLogPrinter(printer LogPrinter) *Config
- func (c *Config) WithProxyFromEnvironment(value bool) *Config
- func (c *Config) WithProxyHost(value string) *Config
- func (c *Config) WithReadWriteTimeout(value time.Duration) *Config
- func (c *Config) WithRegion(region string) *Config
- func (c *Config) WithRetryMaxAttempts(value int) *Config
- func (c *Config) WithRetryer(retryer retry.Retryer) *Config
- func (c *Config) WithSignatureVersion(value SignatureVersionType) *Config
- func (c *Config) WithUploadBandwidthlimit(value int64) *Config
- func (c *Config) WithUseAccelerateEndpoint(value bool) *Config
- func (c *Config) WithUseCName(enable bool) *Config
- func (c *Config) WithUseDualStackEndpoint(value bool) *Config
- func (c *Config) WithUseInternalEndpoint(value bool) *Config
- func (c *Config) WithUsePathStyle(enable bool) *Config
- func (c *Config) WithUserAgent(value string) *Config
- type Copier
- type CopierOptions
- type CopyAPIClient
- type CopyError
- type CopyObjectRequest
- type CopyObjectResult
- type CopyResult
- type CreateAccessPointConfiguration
- type CreateAccessPointRequest
- type CreateAccessPointResult
- type CreateBucketConfiguration
- type CreateCnameTokenRequest
- type CreateCnameTokenResult
- type CreateSelectObjectMetaRequest
- type CreateSelectObjectMetaResult
- type CsvMetaRequest
- type DataRedundancyType
- type DeleteAccessPointPolicyRequest
- type DeleteAccessPointPolicyResult
- type DeleteAccessPointPublicAccessBlockRequest
- type DeleteAccessPointPublicAccessBlockResult
- type DeleteAccessPointRequest
- type DeleteAccessPointResult
- type DeleteBucketCorsRequest
- type DeleteBucketCorsResult
- type DeleteBucketEncryptionRequest
- type DeleteBucketEncryptionResult
- type DeleteBucketInventoryRequest
- type DeleteBucketInventoryResult
- type DeleteBucketLifecycleRequest
- type DeleteBucketLifecycleResult
- type DeleteBucketLoggingRequest
- type DeleteBucketLoggingResult
- type DeleteBucketPolicyRequest
- type DeleteBucketPolicyResult
- type DeleteBucketPublicAccessBlockRequest
- type DeleteBucketPublicAccessBlockResult
- type DeleteBucketReplicationRequest
- type DeleteBucketReplicationResult
- type DeleteBucketRequest
- type DeleteBucketResult
- type DeleteBucketTagsRequest
- type DeleteBucketTagsResult
- type DeleteBucketWebsiteRequest
- type DeleteBucketWebsiteResult
- type DeleteCnameRequest
- type DeleteCnameResult
- type DeleteMultipleObjectsRequest
- type DeleteMultipleObjectsResult
- type DeleteObject
- type DeleteObjectRequest
- type DeleteObjectResult
- type DeleteObjectTaggingRequest
- type DeleteObjectTaggingResult
- type DeletePublicAccessBlockRequest
- type DeletePublicAccessBlockResult
- type DeleteStyleRequest
- type DeleteStyleResult
- type DeleteUserDefinedLogFieldsConfigRequest
- type DeleteUserDefinedLogFieldsConfigResult
- type DeletedInfo
- type DeserializationError
- type DiscardReadCloser
- type DoMetaQueryRequest
- type DoMetaQueryResult
- type DownloadAPIClient
- type DownloadError
- type DownloadResult
- type Downloader
- type DownloaderOptions
- type EncryptionClient
- func (e *EncryptionClient) AbortMultipartUpload(ctx context.Context, request *AbortMultipartUploadRequest, ...) (*AbortMultipartUploadResult, error)
- func (e *EncryptionClient) CompleteMultipartUpload(ctx context.Context, request *CompleteMultipartUploadRequest, ...) (*CompleteMultipartUploadResult, error)
- func (e *EncryptionClient) GetObject(ctx context.Context, request *GetObjectRequest, optFns ...func(*Options)) (*GetObjectResult, error)
- func (e *EncryptionClient) GetObjectMeta(ctx context.Context, request *GetObjectMetaRequest, optFns ...func(*Options)) (*GetObjectMetaResult, error)
- func (e *EncryptionClient) HeadObject(ctx context.Context, request *HeadObjectRequest, optFns ...func(*Options)) (*HeadObjectResult, error)
- func (e *EncryptionClient) InitiateMultipartUpload(ctx context.Context, request *InitiateMultipartUploadRequest, ...) (*InitiateMultipartUploadResult, error)
- func (e *EncryptionClient) ListParts(ctx context.Context, request *ListPartsRequest, optFns ...func(*Options)) (*ListPartsResult, error)
- func (c *EncryptionClient) NewDownloader(optFns ...func(*DownloaderOptions)) *Downloader
- func (c *EncryptionClient) NewUploader(optFns ...func(*UploaderOptions)) *Uploader
- func (c *EncryptionClient) OpenFile(ctx context.Context, bucket string, key string, optFns ...func(*OpenOptions)) (*ReadOnlyFile, error)
- func (e *EncryptionClient) PutObject(ctx context.Context, request *PutObjectRequest, optFns ...func(*Options)) (*PutObjectResult, error)
- func (e *EncryptionClient) Unwrap() *Client
- func (e *EncryptionClient) UploadPart(ctx context.Context, request *UploadPartRequest, optFns ...func(*Options)) (*UploadPartResult, error)
- type EncryptionClientOptions
- type EncryptionMultiPartContext
- type EndpointType
- type ErrorDocument
- type ExtendBucketWormRequest
- type ExtendBucketWormResult
- type ExtendWormConfiguration
- type FeatureFlagsType
- type GetAccessPointPolicyRequest
- type GetAccessPointPolicyResult
- type GetAccessPointPublicAccessBlockRequest
- type GetAccessPointPublicAccessBlockResult
- type GetAccessPointRequest
- type GetAccessPointResult
- type GetBucketAccessMonitorRequest
- type GetBucketAccessMonitorResult
- type GetBucketAclRequest
- type GetBucketAclResult
- type GetBucketArchiveDirectReadRequest
- type GetBucketArchiveDirectReadResult
- type GetBucketCorsRequest
- type GetBucketCorsResult
- type GetBucketEncryptionRequest
- type GetBucketEncryptionResult
- type GetBucketHttpsConfigRequest
- type GetBucketHttpsConfigResult
- type GetBucketInfoRequest
- type GetBucketInfoResult
- type GetBucketInventoryRequest
- type GetBucketInventoryResult
- type GetBucketLifecycleRequest
- type GetBucketLifecycleResult
- type GetBucketLocationRequest
- type GetBucketLocationResult
- type GetBucketLoggingRequest
- type GetBucketLoggingResult
- type GetBucketPolicyRequest
- type GetBucketPolicyResult
- type GetBucketPolicyStatusRequest
- type GetBucketPolicyStatusResult
- type GetBucketPublicAccessBlockRequest
- type GetBucketPublicAccessBlockResult
- type GetBucketRefererRequest
- type GetBucketRefererResult
- type GetBucketReplicationLocationRequest
- type GetBucketReplicationLocationResult
- type GetBucketReplicationProgressRequest
- type GetBucketReplicationProgressResult
- type GetBucketReplicationRequest
- type GetBucketReplicationResult
- type GetBucketRequestPaymentRequest
- type GetBucketRequestPaymentResult
- type GetBucketResourceGroupRequest
- type GetBucketResourceGroupResult
- type GetBucketStatRequest
- type GetBucketStatResult
- type GetBucketTagsRequest
- type GetBucketTagsResult
- type GetBucketTransferAccelerationRequest
- type GetBucketTransferAccelerationResult
- type GetBucketVersioningRequest
- type GetBucketVersioningResult
- type GetBucketWebsiteRequest
- type GetBucketWebsiteResult
- type GetBucketWormRequest
- type GetBucketWormResult
- type GetCnameTokenRequest
- type GetCnameTokenResult
- type GetMetaQueryStatusRequest
- type GetMetaQueryStatusResult
- type GetObjectAclRequest
- type GetObjectAclResult
- type GetObjectMetaRequest
- type GetObjectMetaResult
- type GetObjectRequest
- type GetObjectResult
- type GetObjectTaggingRequest
- type GetObjectTaggingResult
- type GetPublicAccessBlockRequest
- type GetPublicAccessBlockResult
- type GetStyleRequest
- type GetStyleResult
- type GetSymlinkRequest
- type GetSymlinkResult
- type GetUserDefinedLogFieldsConfigRequest
- type GetUserDefinedLogFieldsConfigResult
- type HTTPClient
- type HTTPContentRange
- type HTTPRange
- type HeadObjectRequest
- type HeadObjectResult
- type HistoricalObjectReplicationType
- type HttpsConfiguration
- type IndexDocument
- type InitiateBucketWormRequest
- type InitiateBucketWormResult
- type InitiateMultipartUploadRequest
- type InitiateMultipartUploadResult
- type InitiateWormConfiguration
- type InputSerialization
- type InputSerializationCSV
- type InputSerializationJSON
- type InputSerializationSelect
- type InvalidParamError
- type InventoryConfiguration
- type InventoryDestination
- type InventoryEncryption
- type InventoryFilter
- type InventoryFormatType
- type InventoryFrequencyType
- type InventoryOSSBucketDestination
- type InventoryOptionalFieldType
- type InventorySchedule
- type IsObjectExistOptions
- type JSONSelectInput
- type JSONSelectOutput
- type JsonMetaRequest
- type LifecycleConfiguration
- type LifecycleRule
- type LifecycleRuleAbortMultipartUpload
- type LifecycleRuleExpiration
- type LifecycleRuleFilter
- type LifecycleRuleNot
- type LifecycleRuleTransition
- type LimitedReadCloser
- type ListAccessPointsRequest
- type ListAccessPointsResult
- type ListBucketInventoryRequest
- type ListBucketInventoryResult
- type ListBucketsPaginator
- type ListBucketsRequest
- type ListBucketsResult
- type ListCnameRequest
- type ListCnameResult
- type ListInventoryConfigurationsResult
- type ListMultipartUploadsPaginator
- type ListMultipartUploadsRequest
- type ListMultipartUploadsResult
- type ListObjectVersionsPaginator
- type ListObjectVersionsRequest
- type ListObjectVersionsResult
- type ListObjectsPaginator
- type ListObjectsRequest
- type ListObjectsResult
- type ListObjectsV2Paginator
- type ListObjectsV2Request
- type ListObjectsV2Result
- type ListPartsAPIClient
- type ListPartsPaginator
- type ListPartsRequest
- type ListPartsResult
- type ListStyleRequest
- type ListStyleResult
- type LocationRTCConstraint
- type LocationTransferType
- type LocationTransferTypeConstraint
- type LogPrinter
- type LogPrinterFunc
- type Logger
- type LoggingEnabled
- type LoggingHeaderSet
- type LoggingParamSet
- type MetaQuery
- type MetaQueryAggregation
- type MetaQueryAggregations
- type MetaQueryFile
- type MetaQueryOrderType
- type MetaQueryStatus
- type MetaQueryTagging
- type MetaQueryUserMeta
- type MirrorHeaders
- type MirrorHeadersSet
- type MultiBytesReader
- type NoncurrentVersionExpiration
- type NoncurrentVersionTransition
- type ObjectACLType
- type ObjectDeleteMarkerProperties
- type ObjectMixProperties
- type ObjectProperties
- type ObjectVersionProperties
- type OpenFileAPIClient
- type OpenMetaQueryRequest
- type OpenMetaQueryResult
- type OpenOptions
- type OperationError
- type OperationInput
- type OperationMetadata
- type OperationOutput
- type OptionObjectRequest
- type OptionObjectResult
- type OptionalFields
- type Options
- type OutputSerializationSelect
- type Owner
- type PaginatorOptions
- type Part
- type PayerType
- type PolicyStatus
- type PresignOptions
- type PresignResult
- type ProcessObjectRequest
- type ProcessObjectResult
- type ProgressFunc
- type PublicAccessBlockConfiguration
- type PutAccessPointPolicyRequest
- type PutAccessPointPolicyResult
- type PutAccessPointPublicAccessBlockRequest
- type PutAccessPointPublicAccessBlockResult
- type PutBucketAccessMonitorRequest
- type PutBucketAccessMonitorResult
- type PutBucketAclRequest
- type PutBucketAclResult
- type PutBucketArchiveDirectReadRequest
- type PutBucketArchiveDirectReadResult
- type PutBucketCorsRequest
- type PutBucketCorsResult
- type PutBucketEncryptionRequest
- type PutBucketEncryptionResult
- type PutBucketHttpsConfigRequest
- type PutBucketHttpsConfigResult
- type PutBucketInventoryRequest
- type PutBucketInventoryResult
- type PutBucketLifecycleRequest
- type PutBucketLifecycleResult
- type PutBucketLoggingRequest
- type PutBucketLoggingResult
- type PutBucketPolicyRequest
- type PutBucketPolicyResult
- type PutBucketPublicAccessBlockRequest
- type PutBucketPublicAccessBlockResult
- type PutBucketRefererRequest
- type PutBucketRefererResult
- type PutBucketReplicationRequest
- type PutBucketReplicationResult
- type PutBucketRequest
- type PutBucketRequestPaymentRequest
- type PutBucketRequestPaymentResult
- type PutBucketResourceGroupRequest
- type PutBucketResourceGroupResult
- type PutBucketResult
- type PutBucketRtcRequest
- type PutBucketRtcResult
- type PutBucketTagsRequest
- type PutBucketTagsResult
- type PutBucketTransferAccelerationRequest
- type PutBucketTransferAccelerationResult
- type PutBucketVersioningRequest
- type PutBucketVersioningResult
- type PutBucketWebsiteRequest
- type PutBucketWebsiteResult
- type PutCnameRequest
- type PutCnameResult
- type PutObjectAclRequest
- type PutObjectAclResult
- type PutObjectRequest
- type PutObjectResult
- type PutObjectTaggingRequest
- type PutObjectTaggingResult
- type PutPublicAccessBlockRequest
- type PutPublicAccessBlockResult
- type PutStyleRequest
- type PutStyleResult
- type PutSymlinkRequest
- type PutSymlinkResult
- type PutUserDefinedLogFieldsConfigRequest
- type PutUserDefinedLogFieldsConfigResult
- type RangeReader
- type ReadFlagInfo
- type ReadOnlyFile
- type ReadSeekerNopClose
- func (r ReadSeekerNopClose) Close() error
- func (r ReadSeekerNopClose) GetLen() (int64, error)
- func (r ReadSeekerNopClose) HasLen() (int, bool)
- func (r ReadSeekerNopClose) IsSeeker() bool
- func (r ReadSeekerNopClose) Read(p []byte) (int, error)
- func (r ReadSeekerNopClose) Seek(offset int64, whence int) (int64, error)
- type ReaderRangeGetFn
- type ReaderRangeGetOutput
- type ReaderWrapper
- type RefererBlacklist
- type RefererConfiguration
- type RefererList
- type ReplicationConfiguration
- type ReplicationDestination
- type ReplicationEncryptionConfiguration
- type ReplicationLocation
- type ReplicationPrefixSet
- type ReplicationProgress
- type ReplicationProgressInformation
- type ReplicationProgressRule
- type ReplicationRule
- type ReplicationRules
- type ReplicationSourceSelectionCriteria
- type ReplicationTimeControl
- type RequestBodyTracker
- type RequestCommon
- type RequestCommonInterface
- type RequestPaymentConfiguration
- type RestoreObjectRequest
- type RestoreObjectResult
- type RestoreRequest
- type ResultCommon
- type ResultCommonInterface
- type RoutingRule
- type RoutingRuleCondition
- type RoutingRuleIncludeHeader
- type RoutingRuleRedirect
- type RoutingRules
- type RtcConfiguration
- type SSEKMS
- type SSERule
- type SelectObjectRequest
- type SelectObjectResult
- type SelectOptions
- type SelectRequest
- type SerializationError
- type ServerSideEncryptionRule
- type ServiceError
- type SignatureVersionType
- type SseKmsEncryptedObjects
- type StatusType
- type StorageClassType
- type StyleContent
- type StyleInfo
- type StyleList
- type TLS
- type Tag
- type TagSet
- type Tagging
- type TransferAccelerationConfiguration
- type TransferTypeType
- type TransferTypes
- type Upload
- type UploadAPIClient
- type UploadError
- type UploadPart
- type UploadPartCopyRequest
- type UploadPartCopyResult
- type UploadPartRequest
- type UploadPartResult
- type UploadParts
- type UploadResult
- type Uploader
- type UploaderOptions
- type UrlStyleType
- type UserDefinedLogFieldsConfiguration
- type VersioningConfiguration
- type VersioningStatusType
- type WebsiteConfiguration
- type WormConfiguration
- type XmlChildren
- type XmlDecoderLite
- type XmlNode
Constants ¶
const ( DataFrameType = 8388609 ContinuousFrameType = 8388612 EndFrameType = 8388613 MetaEndFrameCSVType = 8388614 MetaEndFrameJSONType = 8388615 )
FrameType
const ( MaxUploadParts int32 = 10000 // Max part size, 5GB, For UploadPart MaxPartSize int64 = 5 * 1024 * 1024 * 1024 // Min part size, 100KB, For UploadPart MinPartSize int64 = 100 * 1024 // Default part size, 6M DefaultPartSize int64 = 6 * 1024 * 1024 // Default part size for uploader uploads data DefaultUploadPartSize = DefaultPartSize // Default part size for downloader downloads object DefaultDownloadPartSize = DefaultPartSize // Default part size for copier copys object, 64M DefaultCopyPartSize int64 = 64 * 1024 * 1024 // Default parallel DefaultParallel = 3 // Default parallel for uploader uploads data DefaultUploadParallel = DefaultParallel // Default parallel for downloader downloads object DefaultDownloadParallel = DefaultParallel // Default parallel for copier copys object DefaultCopyParallel = DefaultParallel // Default prefetch threshold to swith to async read in ReadOnlyFile DefaultPrefetchThreshold int64 = 20 * 1024 * 1024 // Default prefetch number for async read in ReadOnlyFile DefaultPrefetchNum = DefaultParallel // Default prefetch chunk size for async read in ReadOnlyFile DefaultPrefetchChunkSize = DefaultPartSize // Default threshold to use muitipart copy in Copier, 256M DefaultCopyThreshold int64 = 200 * 1024 * 1024 // File permission FilePermMode = os.FileMode(0664) // Temp file suffix TempFileSuffix = ".temp" // Checkpoint file suffix for Downloader CheckpointFileSuffixDownloader = ".dcp" // Checkpoint file suffix for Uploader CheckpointFileSuffixUploader = ".ucp" // Checkpoint file Magic CheckpointMagic = "92611BED-89E2-46B6-89E5-72F273D4B0A3" // Product for signing DefaultProduct = "oss" // The URL's scheme, default is https DefaultEndpointScheme = "https" // Default signature version is v4 DefaultSignatureVersion = SignatureVersionV4 )
const ( HeaderOssPrefix string = "X-Oss-" HeaderOssMetaPrefix = "X-Oss-Meta-" HeaderOssACL = "X-Oss-Acl" HeaderOssObjectACL = "X-Oss-Object-Acl" HeaderOssObjectType = "X-Oss-Object-Type" HeaderOssSecurityToken = "X-Oss-Security-Token" HeaderOssServerSideEncryption = "X-Oss-Server-Side-Encryption" HeaderOssServerSideEncryptionKeyID = "X-Oss-Server-Side-Encryption-Key-Id" HeaderOssServerSideDataEncryption = "X-Oss-Server-Side-Data-Encryption" HeaderOssSSECAlgorithm = "X-Oss-Server-Side-Encryption-Customer-Algorithm" HeaderOssSSECKey = "X-Oss-Server-Side-Encryption-Customer-Key" HeaderOssSSECKeyMd5 = "X-Oss-Server-Side-Encryption-Customer-Key-MD5" HeaderOssCopySource = "X-Oss-Copy-Source" HeaderOssCopySourceRange = "X-Oss-Copy-Source-Range" HeaderOssCopySourceIfMatch = "X-Oss-Copy-Source-If-Match" HeaderOssCopySourceIfNoneMatch = "X-Oss-Copy-Source-If-None-Match" HeaderOssCopySourceIfModifiedSince = "X-Oss-Copy-Source-If-Modified-Since" HeaderOssCopySourceIfUnmodifiedSince = "X-Oss-Copy-Source-If-Unmodified-Since" HeaderOssMetadataDirective = "X-Oss-Metadata-Directive" HeaderOssNextAppendPosition = "X-Oss-Next-Append-Position" HeaderOssRequestID = "X-Oss-Request-Id" HeaderOssCRC64 = "X-Oss-Hash-Crc64ecma" HeaderOssSymlinkTarget = "X-Oss-Symlink-Target" HeaderOssStorageClass = "X-Oss-Storage-Class" HeaderOssCallback = "X-Oss-Callback" HeaderOssCallbackVar = "X-Oss-Callback-Var" HeaderOssRequester = "X-Oss-Request-Payer" HeaderOssTagging = "X-Oss-Tagging" HeaderOssTaggingDirective = "X-Oss-Tagging-Directive" HeaderOssTrafficLimit = "X-Oss-Traffic-Limit" HeaderOssForbidOverWrite = "X-Oss-Forbid-Overwrite" HeaderOssRangeBehavior = "X-Oss-Range-Behavior" HeaderOssAllowSameActionOverLap = "X-Oss-Allow-Same-Action-Overlap" HeaderOssDate = "X-Oss-Date" HeaderOssContentSha256 = "X-Oss-Content-Sha256" HeaderOssEC = "X-Oss-Ec" HeaderOssERR = "X-Oss-Err" )
OSS headers
const ( OssClientSideEncryptionKey string = "X-Oss-Meta-Client-Side-Encryption-Key" OssClientSideEncryptionStart = "X-Oss-Meta-Client-Side-Encryption-Start" OssClientSideEncryptionCekAlg = "X-Oss-Meta-Client-Side-Encryption-Cek-Alg" OssClientSideEncryptionWrapAlg = "X-Oss-Meta-Client-Side-Encryption-Wrap-Alg" OssClientSideEncryptionMatDesc = "X-Oss-Meta-Client-Side-Encryption-Matdesc" OssClientSideEncryptionUnencryptedContentLength = "X-Oss-Meta-Client-Side-Encryption-Unencrypted-Content-Length" OssClientSideEncryptionUnencryptedContentMD5 = "X-Oss-Meta-Client-Side-Encryption-Unencrypted-Content-Md5" OssClientSideEncryptionDataSize = "X-Oss-Meta-Client-Side-Encryption-Data-Size" OssClientSideEncryptionPartSize = "X-Oss-Meta-Client-Side-Encryption-Part-Size" )
OSS headers for client sider encryption
const ( HTTPHeaderAcceptEncoding string = "Accept-Encoding" HTTPHeaderAuthorization = "Authorization" HTTPHeaderCacheControl = "Cache-Control" HTTPHeaderContentDisposition = "Content-Disposition" HTTPHeaderContentEncoding = "Content-Encoding" HTTPHeaderContentLength = "Content-Length" HTTPHeaderContentMD5 = "Content-MD5" HTTPHeaderContentType = "Content-Type" HTTPHeaderContentLanguage = "Content-Language" HTTPHeaderContentRange = "Content-Range" HTTPHeaderDate = "Date" HTTPHeaderETag = "ETag" HTTPHeaderExpires = "Expires" HTTPHeaderHost = "Host" HTTPHeaderLastModified = "Last-Modified" HTTPHeaderRange = "Range" HTTPHeaderLocation = "Location" HTTPHeaderUserAgent = "User-Agent" HTTPHeaderIfModifiedSince = "If-Modified-Since" HTTPHeaderIfUnmodifiedSince = "If-Unmodified-Since" HTTPHeaderIfMatch = "If-Match" HTTPHeaderIfNoneMatch = "If-None-Match" )
HTTP headers
const ( OpMetaKeyResponsHandler string = "opm-response-handler" OpMetaKeyRequestBodyTracker string = "opm-request-body-tracker" )
OperationMetadata Keys
const ( BwTokenBucketSlotRx int = iota BwTokenBucketSlotTx BwTokenBucketSlots )
const ( LogOff = iota LogError LogWarn LogInfo LogDebug )
Define the level of the output log
const (
AsyncReadeBufferSize = 1024 * 1024
)
const (
EncryptionUaSuffix string = "OssEncryptionClient"
)
EncryptionUaSuffix user agent tag for client encryption
const (
SdkName = "alibabacloud-go-sdk-v2"
)
Variables ¶
This section is empty.
Functions ¶
func CRC64Combine ¶
CRC64Combine combines CRC64
func FileExists ¶
FileExists returns whether the given file exists or not
func GetReaderLen ¶
func NewCRC64 ¶
NewCRC64 NewCRC creates a new hash.Hash64 computing the CRC64 checksum using the polynomial represented by the Table.
func NewLimitedReadCloser ¶
func NewLimitedReadCloser(rc io.ReadCloser, limit int64) io.ReadCloser
func NewProgress ¶
func NewProgress(pr ProgressFunc, total int64) io.Writer
NewProgress NewRequestProgress creates a tracker with progress reporting
func OpReadWriteTimeout ¶
func ParseContentRange ¶
ParseRange parses a ContentRange from a ContentRange: header. It only accepts bytes 22-33/42 and bytes 22-33/* format.
func PresignExpiration ¶
func PresignExpiration(value time.Time) func(*PresignOptions)
func PresignExpires ¶
func PresignExpires(value time.Duration) func(*PresignOptions)
func SliceOfPtrs ¶
func SliceOfPtrs[T any](vv ...T) []*T
SliceOfPtrs returns a slice of *T from the specified values.
func TeeReadNopCloser ¶
TeeReadNopCloser returns a Reader that writes to w what it reads from r. All reads from r performed through it are matched with corresponding writes to w. There is no internal buffering - the write must complete before the read completes. Any error encountered while writing is reported as a read error.
func ToBool ¶
ToBool returns bool value if the pointer is not nil. Returns a bool zero value if the pointer is nil.
func ToDuration ¶
ToDuration returns time.Duration value if the pointer is not nil. Returns a time.Duration zero value if the pointer is nil.
func ToInt ¶
ToInt returns int value if the pointer is not nil. Returns a int zero value if the pointer is nil.
func ToInt64 ¶
ToInt64 returns int value if the pointer is not nil. Returns a int64 zero value if the pointer is nil.
func ToLogLevel ¶
func ToString ¶
ToString returns bool value if the pointer is not nil. Returns a string zero value if the pointer is nil.
func ToTime ¶
ToTime returns time.Time value if the pointer is not nil. Returns a time.Time zero value if the pointer is nil.
func TypeByExtension ¶
TypeByExtension returns the MIME type associated with the file extension ext. gets the file's MIME type for HTTP header Content-Type
Types ¶
type AbortBucketWormRequest ¶ added in v1.1.0
type AbortBucketWormRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type AbortBucketWormResult ¶ added in v1.1.0
type AbortBucketWormResult struct {
ResultCommon
}
type AbortMultipartUploadRequest ¶
type AbortMultipartUploadRequest struct { // The name of the bucket. Bucket *string `input:"host,uploadId,required"` // The name of the object. Key *string `input:"path,key,required"` // The ID of the multipart upload task. UploadId *string `input:"query,uploadId,required"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type AbortMultipartUploadResult ¶
type AbortMultipartUploadResult struct {
ResultCommon
}
type AccessMonitorConfiguration ¶ added in v1.1.0
type AccessMonitorConfiguration struct { // The access tracking status of the bucket. Valid values:- Enabled: Access tracking is enabled.- Disabled: Access tracking is disabled. Status AccessMonitorStatusType `xml:"Status"` }
type AccessMonitorStatusType ¶ added in v1.1.0
type AccessMonitorStatusType string
AccessMonitorStatusType The type of access monitor status
const ( AccessMonitorStatusEnabled AccessMonitorStatusType = "Enabled" AccessMonitorStatusDisabled AccessMonitorStatusType = "Disabled" )
Enum values for AccessMonitorStatusType
type AccessPoint ¶ added in v1.1.2
type AccessPoint struct { // The network origin of the access point. NetworkOrigin *string `xml:"NetworkOrigin"` // The container that stores the information about the VPC. VpcConfiguration *AccessPointVpcConfiguration `xml:"VpcConfiguration"` // The status of the access point. Status *string `xml:"Status"` // The name of the bucket for which the access point is configured. Bucket *string `xml:"Bucket"` // The name of the access point. AccessPointName *string `xml:"AccessPointName"` // The alias of the access point. Alias *string `xml:"Alias"` }
type AccessPointVpcConfiguration ¶ added in v1.1.2
type AccessPointVpcConfiguration struct { // The ID of the VPC that is required only when the NetworkOrigin parameter is set to vpc. VpcId *string `xml:"VpcId"` }
type AppendFileAPIClient ¶
type AppendFileAPIClient interface { HeadObject(ctx context.Context, request *HeadObjectRequest, optFns ...func(*Options)) (*HeadObjectResult, error) AppendObject(ctx context.Context, request *AppendObjectRequest, optFns ...func(*Options)) (*AppendObjectResult, error) }
type AppendObjectRequest ¶
type AppendObjectRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // The position from which the AppendObject operation starts. // Each time an AppendObject operation succeeds, the x-oss-next-append-position header is included in // the response to specify the position from which the next AppendObject operation starts. Position *int64 `input:"query,position,required"` // The caching behavior of the web page when the object is downloaded. CacheControl *string `input:"header,Cache-Control"` // The method that is used to access the object. ContentDisposition *string `input:"header,Content-Disposition"` // The method that is used to encode the object. ContentEncoding *string `input:"header,Content-Encoding"` // The size of the data in the HTTP message body. Unit: bytes. ContentLength *int64 `input:"header,Content-Length"` // The MD5 hash of the object that you want to upload. ContentMD5 *string `input:"header,Content-MD5"` // The expiration time of the cache in UTC. Expires *string `input:"header,Expires"` // A standard MIME type describing the format of the contents. ContentType *string `input:"header,Content-Type"` // Specifies whether the object that is uploaded by calling the PutObject operation // overwrites an existing object that has the same name. Valid values: true and false ForbidOverwrite *string `input:"header,x-oss-forbid-overwrite"` // The encryption method on the server side when an object is created. // Valid values: AES256 and KMS ServerSideEncryption *string `input:"header,x-oss-server-side-encryption"` //The ID of the customer master key (CMK) that is managed by Key Management Service (KMS). //This header is valid only when the x-oss-server-side-encryption header is set to KMS. ServerSideDataEncryption *string `input:"header,x-oss-server-side-data-encryption"` // The ID of the customer master key (CMK) that is managed by Key Management Service (KMS). SSEKMSKeyId *string `input:"header,x-oss-server-side-encryption-key-id"` // The access control list (ACL) of the object. Acl ObjectACLType `input:"header,x-oss-object-acl"` // The storage class of the object. StorageClass StorageClassType `input:"header,x-oss-storage-class"` // The metadata of the object that you want to upload. Metadata map[string]string `input:"header,x-oss-meta-,usermeta"` // The tags that are specified for the object by using a key-value pair. // You can specify multiple tags for an object. Example: TagA=A&TagB=B. Tagging *string `input:"header,x-oss-tagging"` // Specify the speed limit value. The speed limit value ranges from 245760 to 838860800, with a unit of bit/s. TrafficLimit int64 `input:"header,x-oss-traffic-limit"` // Object data. Body io.Reader `input:"body,nop"` // Specify the initial value of CRC64. If not set, the crc check is ignored. InitHashCRC64 *string // Progress callback function ProgressFn ProgressFunc // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type AppendObjectResult ¶
type AppendObjectResult struct { // Version of the object. VersionId *string `output:"header,x-oss-version-id"` // The 64-bit CRC value of the object. // This value is calculated based on the ECMA-182 standard. HashCRC64 *string `output:"header,x-oss-hash-crc64ecma"` // The position that must be provided in the next request, which is the current length of the object. NextPosition int64 `output:"header,x-oss-next-append-position"` // The encryption method on the server side when an object is created. // Valid values: AES256 and KMS ServerSideEncryption *string `output:"header,x-oss-server-side-encryption"` // The ID of the customer master key (CMK) that is managed by Key Management Service (KMS). // This header is valid only when the x-oss-server-side-encryption header is set to KMS. ServerSideDataEncryption *string `output:"header,x-oss-server-side-data-encryption"` // The ID of the customer master key (CMK) that is managed by Key Management Service (KMS). SSEKMSKeyId *string `output:"header,x-oss-server-side-encryption-key-id"` // A map of metadata to store with the object. Metadata map[string]string `output:"header,x-oss-meta-,usermeta"` ResultCommon }
type AppendOnlyFile ¶
type AppendOnlyFile struct {
// contains filtered or unexported fields
}
func NewAppendFile ¶
func NewAppendFile(ctx context.Context, c AppendFileAPIClient, bucket string, key string, optFns ...func(*AppendOptions)) (*AppendOnlyFile, error)
NewAppendFile AppendFile opens or creates the named file for appending. If successful, methods on the returned file can be used for appending.
func (*AppendOnlyFile) Stat ¶
func (f *AppendOnlyFile) Stat() (os.FileInfo, error)
Stat returns the FileInfo structure describing file.
type AppendOptions ¶
type AppendOptions struct { // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string // The parameters when the object is first generated, supports below // CacheControl, ContentEncoding, Expires, ContentType, ContentType, Metadata // SSE's parameters, Acl, StorageClass, Tagging // If the object exists, ignore this parameters CreateParameter *AppendObjectRequest }
type ApplyServerSideEncryptionByDefault ¶ added in v1.1.0
type ApplyServerSideEncryptionByDefault struct { // The default server-side encryption method. Valid values: KMS, AES256, and SM4. You are charged when you call API operations to encrypt or decrypt data by using CMKs managed by KMS. For more information, see [Billing of KMS](~~52608~~). If the default server-side encryption method is configured for the destination bucket and ReplicaCMKID is configured in the CRR rule:* If objects in the source bucket are not encrypted, they are encrypted by using the default encryption method of the destination bucket after they are replicated.* If objects in the source bucket are encrypted by using SSE-KMS or SSE-OSS, they are encrypted by using the same method after they are replicated.For more information, see [Use data replication with server-side encryption](~~177216~~). SSEAlgorithm *string `xml:"SSEAlgorithm"` // The CMK ID that is specified when SSEAlgorithm is set to KMS and a specified CMK is used for encryption. In other cases, leave this parameter empty. KMSMasterKeyID *string `xml:"KMSMasterKeyID"` // The algorithm that is used to encrypt objects. If this parameter is not specified, objects are encrypted by using AES256. This parameter is valid only when SSEAlgorithm is set to KMS. Valid value: SM4. KMSDataEncryption *string `xml:"KMSDataEncryption"` }
type ArchiveDirectReadConfiguration ¶ added in v1.1.0
type ArchiveDirectReadConfiguration struct { // Specifies whether to enable real-time access of Archive objects for a bucket. Valid values:- true- false Enabled *bool `xml:"Enabled"` }
type AsyncProcessObjectRequest ¶
type AsyncProcessObjectRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // Image async processing parameters AsyncProcess *string `input:"x-async-oss-process,nop,required"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type AsyncProcessObjectResult ¶
type AsyncProcessObjectResult struct { EventId string `json:"EventId"` RequestId string `json:"RequestId"` TaskId string `json:"TaskId"` ResultCommon }
type AsyncRangeReader ¶
type AsyncRangeReader struct {
// contains filtered or unexported fields
}
func NewAsyncRangeReader ¶
func NewAsyncRangeReader(ctx context.Context, rangeGet ReaderRangeGetFn, httpRange *HTTPRange, etag string, buffers int) (*AsyncRangeReader, error)
NewAsyncRangeReader returns a reader that will asynchronously read from the Reader returued by getter from the given offset into a number of buffers each of size AsyncReadeBufferSize The input can be read from the returned reader. When done use Close to release the buffers and close the supplied input. The etag is used to identify the content of the object. If not set, the first ETag returned value will be used instead.
func (*AsyncRangeReader) Close ¶
func (a *AsyncRangeReader) Close() (err error)
func (*AsyncRangeReader) Offset ¶
func (a *AsyncRangeReader) Offset() int64
type AuthMethodType ¶
type AuthMethodType int
const ( AuthMethodHeader AuthMethodType = iota AuthMethodQuery )
func (AuthMethodType) String ¶
func (f AuthMethodType) String() string
type BucketACLType ¶
type BucketACLType string
BucketACLType The access control list (ACL) of the bucket
const ( // BucketACLPrivate Only the bucket owner can perform read and write operations on objects in the bucket. // Other users cannot access the objects in the bucket. BucketACLPrivate BucketACLType = "private" // BucketACLPublicRead Only the bucket owner can write data to objects in the bucket. // Other users, including anonymous users, can only read objects in the bucket. BucketACLPublicRead BucketACLType = "public-read" // BucketACLPublicReadWrite All users, including anonymous users, can perform read and write operations on the bucket. BucketACLPublicReadWrite BucketACLType = "public-read-write" )
Enum values for BucketACLType
type BucketCnameConfiguration ¶ added in v1.1.1
type BucketCnameConfiguration struct { // The custom domain name. Domain *string `xml:"Cname>Domain"` // The container for which the certificate is configured. CertificateConfiguration *CertificateConfiguration `xml:"Cname>CertificateConfiguration"` }
type BucketInfo ¶
type BucketInfo struct { // The name of the bucket. Name *string `xml:"Name"` // Indicates whether access tracking is enabled for the bucket. AccessMonitor *string `xml:"AccessMonitor"` // The region in which the bucket is located. Location *string `xml:"Location"` // The time when the bucket is created. The time is in UTC. CreationDate *time.Time `xml:"CreationDate"` // The public endpoint that is used to access the bucket over the Internet. ExtranetEndpoint *string `xml:"ExtranetEndpoint"` // The internal endpoint that is used to access the bucket from Elastic IntranetEndpoint *string `xml:"IntranetEndpoint"` // The container that stores the access control list (ACL) information about the bucket. ACL *string `xml:"AccessControlList>Grant"` // The disaster recovery type of the bucket. DataRedundancyType *string `xml:"DataRedundancyType"` // The container that stores the information about the bucket owner. Owner *Owner `xml:"Owner"` // The storage class of the bucket. StorageClass *string `xml:"StorageClass"` // The ID of the resource group to which the bucket belongs. ResourceGroupId *string `xml:"ResourceGroupId"` // The container that stores the server-side encryption method. SseRule SSERule `xml:"ServerSideEncryptionRule"` // Indicates whether versioning is enabled for the bucket. Versioning *string `xml:"Versioning"` // Indicates whether transfer acceleration is enabled for the bucket. TransferAcceleration *string `xml:"TransferAcceleration"` // Indicates whether cross-region replication (CRR) is enabled for the bucket. CrossRegionReplication *string `xml:"CrossRegionReplication"` // The container that stores the logs. BucketPolicy BucketPolicy `xml:"BucketPolicy"` // The description of the bucket. Comment *string `xml:"Comment"` // Indicates whether Block Public Access is enabled for the bucket. // true: Block Public Access is enabled. false: Block Public Access is disabled. BlockPublicAccess *bool `xml:"BlockPublicAccess"` }
BucketInfo defines Bucket information
type BucketLoggingStatus ¶ added in v1.1.0
type BucketLoggingStatus struct { // Indicates the container used to store access logging information. This element is returned if it is enabled and is not returned if it is disabled. LoggingEnabled *LoggingEnabled `xml:"LoggingEnabled"` }
type BucketPolicy ¶
type BucketProperties ¶
type BucketProperties struct { // The name of the bucket. Name *string `xml:"Name"` // The data center in which the bucket is located. Location *string `xml:"Location"` // The time when the bucket was created. Format: yyyy-mm-ddThh:mm:ss.timezone. CreationDate *time.Time `xml:"CreationDate"` // The storage class of the bucket. Valid values: // Standard, IA, Archive, ColdArchive and DeepColdArchive. StorageClass *string `xml:"StorageClass"` // The public endpoint used to access the bucket over the Internet. ExtranetEndpoint *string `xml:"ExtranetEndpoint"` // The internal endpoint that is used to access the bucket from ECS instances // that reside in the same region as the bucket. IntranetEndpoint *string `xml:"IntranetEndpoint"` // The region in which the bucket is located. Region *string `xml:"Region"` // The ID of the resource group to which the bucket belongs. ResourceGroupId *string `xml:"ResourceGroupId"` }
type BucketResourceGroupConfiguration ¶ added in v1.1.0
type BucketResourceGroupConfiguration struct { // The ID of the resource group to which the bucket belongs. ResourceGroupId *string `xml:"ResourceGroupId"` }
type BucketWormStateType ¶ added in v1.1.0
type BucketWormStateType string
BucketWormStateType the type of bucket worm state
const ( BucketWormStateInProgress BucketWormStateType = "InProgress" BucketWormStateLocked BucketWormStateType = "Locked" )
type BwTokenBucket ¶
func (*BwTokenBucket) LimitBandwidth ¶
func (tb *BwTokenBucket) LimitBandwidth(n int)
type BwTokenBuckets ¶
type BwTokenBuckets [BwTokenBucketSlots]*BwTokenBucket
type CORSConfiguration ¶ added in v1.1.0
type CORSConfiguration struct { // The container that stores CORS rules. Up to 10 rules can be configured for a bucket. CORSRules []CORSRule `xml:"CORSRule"` // Indicates whether the Vary: Origin header was returned. Default value: false.- true: The Vary: Origin header is returned regardless whether the request is a cross-origin request or whether the cross-origin request succeeds.- false: The Vary: Origin header is not returned. ResponseVary *bool `xml:"ResponseVary"` }
type CORSRule ¶ added in v1.1.0
type CORSRule struct { // The origins from which cross-origin requests are allowed. AllowedOrigins []string `xml:"AllowedOrigin"` // The methods that you can use in cross-origin requests. AllowedMethods []string `xml:"AllowedMethod"` // Specifies whether the headers specified by Access-Control-Request-Headers in the OPTIONS preflight request are allowed. Each header specified by Access-Control-Request-Headers must match the value of an AllowedHeader element. You can use only one asterisk (\*) as the wildcard character. AllowedHeaders []string `xml:"AllowedHeader"` // The response headers for allowed access requests from applications, such as an XMLHttpRequest object in JavaScript. The asterisk (\*) wildcard character is not supported. ExposeHeaders []string `xml:"ExposeHeader"` // The period of time within which the browser can cache the response to an OPTIONS preflight request for the specified resource. Unit: seconds.You can specify only one MaxAgeSeconds element in a CORS rule. MaxAgeSeconds *int64 `xml:"MaxAgeSeconds"` }
type CSVSelectInput ¶
type CSVSelectInput struct { FileHeaderInfo *string `xml:"FileHeaderInfo"` RecordDelimiter *string `xml:"RecordDelimiter"` FieldDelimiter *string `xml:"FieldDelimiter"` QuoteCharacter *string `xml:"QuoteCharacter"` CommentCharacter *string `xml:"CommentCharacter"` Range *string `xml:"Range"` SplitRange *string AllowQuotedRecordDelimiter *bool `xml:"AllowQuotedRecordDelimiter"` }
type CSVSelectOutput ¶
type CanceledError ¶
type CanceledError struct {
Err error
}
func (*CanceledError) CanceledError ¶
func (*CanceledError) CanceledError() bool
func (*CanceledError) Error ¶
func (e *CanceledError) Error() string
func (*CanceledError) Unwrap ¶
func (e *CanceledError) Unwrap() error
type CertificateConfiguration ¶ added in v1.1.1
type CertificateConfiguration struct { // The ID of the certificate. CertId *string `xml:"CertId"` // The public key of the certificate. Certificate *string `xml:"Certificate"` // The private key of the certificate. PrivateKey *string `xml:"PrivateKey"` // The ID of the certificate. If the Force parameter is not set to true, the OSS server checks whether the value of the Force parameter matches the current certificate ID. If the value does not match the certificate ID, an error is returned.noticeIf you do not specify the PreviousCertId parameter when you bind a certificate, you must set the Force parameter to true./notice PreviousCertId *string `xml:"PreviousCertId"` // Specifies whether to overwrite the certificate. Valid values:- true: overwrites the certificate.- false: does not overwrite the certificate. Force *bool `xml:"Force"` // Specifies whether to delete the certificate. Valid values:- true: deletes the certificate.- false: does not delete the certificate. DeleteCertificate *bool `xml:"DeleteCertificate"` }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AbortBucketWorm ¶ added in v1.1.0
func (c *Client) AbortBucketWorm(ctx context.Context, request *AbortBucketWormRequest, optFns ...func(*Options)) (*AbortBucketWormResult, error)
AbortBucketWorm Deletes an unlocked retention policy for a bucket.
func (*Client) AbortMultipartUpload ¶
func (c *Client) AbortMultipartUpload(ctx context.Context, request *AbortMultipartUploadRequest, optFns ...func(*Options)) (*AbortMultipartUploadResult, error)
AbortMultipartUpload Cancels a multipart upload task and deletes the parts uploaded in the task.
func (*Client) AppendFile ¶
func (c *Client) AppendFile(ctx context.Context, bucket string, key string, optFns ...func(*AppendOptions)) (*AppendOnlyFile, error)
AppendFile opens or creates the named file for appending.
func (*Client) AppendObject ¶
func (c *Client) AppendObject(ctx context.Context, request *AppendObjectRequest, optFns ...func(*Options)) (*AppendObjectResult, error)
AppendObject Uploads an object by appending the object to an existing object. Objects created by using the AppendObject operation are appendable objects.
func (*Client) AsyncProcessObject ¶
func (c *Client) AsyncProcessObject(ctx context.Context, request *AsyncProcessObjectRequest, optFns ...func(*Options)) (*AsyncProcessObjectResult, error)
AsyncProcessObject apply async process on the specified image file.
func (*Client) CloseMetaQuery ¶ added in v1.1.2
func (c *Client) CloseMetaQuery(ctx context.Context, request *CloseMetaQueryRequest, optFns ...func(*Options)) (*CloseMetaQueryResult, error)
CloseMetaQuery Disables the metadata management feature for an Object Storage Service (OSS) bucket. After the metadata management feature is disabled for a bucket, OSS automatically deletes the metadata index library of the bucket and you cannot perform metadata indexing.
func (*Client) CompleteBucketWorm ¶ added in v1.1.0
func (c *Client) CompleteBucketWorm(ctx context.Context, request *CompleteBucketWormRequest, optFns ...func(*Options)) (*CompleteBucketWormResult, error)
CompleteBucketWorm Locks a retention policy.
func (*Client) CompleteMultipartUpload ¶
func (c *Client) CompleteMultipartUpload(ctx context.Context, request *CompleteMultipartUploadRequest, optFns ...func(*Options)) (*CompleteMultipartUploadResult, error)
CompleteMultipartUpload Completes the multipart upload task of an object after all parts of the object are uploaded.
func (*Client) CopyObject ¶
func (c *Client) CopyObject(ctx context.Context, request *CopyObjectRequest, optFns ...func(*Options)) (*CopyObjectResult, error)
CopyObject Copies objects within a bucket or between buckets in the same region
func (*Client) CreateAccessPoint ¶ added in v1.1.2
func (c *Client) CreateAccessPoint(ctx context.Context, request *CreateAccessPointRequest, optFns ...func(*Options)) (*CreateAccessPointResult, error)
CreateAccessPoint Creates an access point.
func (*Client) CreateCnameToken ¶ added in v1.1.1
func (c *Client) CreateCnameToken(ctx context.Context, request *CreateCnameTokenRequest, optFns ...func(*Options)) (*CreateCnameTokenResult, error)
CreateCnameToken Creates a CNAME token to verify the ownership of a domain name.
func (*Client) CreateSelectObjectMeta ¶
func (c *Client) CreateSelectObjectMeta(ctx context.Context, request *CreateSelectObjectMetaRequest, optFns ...func(*Options)) (*CreateSelectObjectMetaResult, error)
CreateSelectObjectMeta You can call the CreateSelectObjectMeta operation to obtain information about an object, such as the total number of rows and the number of splits.
func (*Client) DeleteAccessPoint ¶ added in v1.1.2
func (c *Client) DeleteAccessPoint(ctx context.Context, request *DeleteAccessPointRequest, optFns ...func(*Options)) (*DeleteAccessPointResult, error)
DeleteAccessPoint Deletes an access point.
func (*Client) DeleteAccessPointPolicy ¶ added in v1.1.2
func (c *Client) DeleteAccessPointPolicy(ctx context.Context, request *DeleteAccessPointPolicyRequest, optFns ...func(*Options)) (*DeleteAccessPointPolicyResult, error)
DeleteAccessPointPolicy Deletes an access point policy.
func (*Client) DeleteAccessPointPublicAccessBlock ¶ added in v1.1.2
func (c *Client) DeleteAccessPointPublicAccessBlock(ctx context.Context, request *DeleteAccessPointPublicAccessBlockRequest, optFns ...func(*Options)) (*DeleteAccessPointPublicAccessBlockResult, error)
DeleteAccessPointPublicAccessBlock Deletes the Block Public Access configurations of an access point.
func (*Client) DeleteBucket ¶
func (c *Client) DeleteBucket(ctx context.Context, request *DeleteBucketRequest, optFns ...func(*Options)) (*DeleteBucketResult, error)
DeleteBucket Deletes a bucket.
func (*Client) DeleteBucketCors ¶ added in v1.1.0
func (c *Client) DeleteBucketCors(ctx context.Context, request *DeleteBucketCorsRequest, optFns ...func(*Options)) (*DeleteBucketCorsResult, error)
DeleteBucketCors Disables the cross-origin resource sharing (CORS) feature and deletes all CORS rules for a bucket.
func (*Client) DeleteBucketEncryption ¶ added in v1.1.0
func (c *Client) DeleteBucketEncryption(ctx context.Context, request *DeleteBucketEncryptionRequest, optFns ...func(*Options)) (*DeleteBucketEncryptionResult, error)
DeleteBucketEncryption Deletes encryption rules for a bucket.
func (*Client) DeleteBucketInventory ¶ added in v1.1.0
func (c *Client) DeleteBucketInventory(ctx context.Context, request *DeleteBucketInventoryRequest, optFns ...func(*Options)) (*DeleteBucketInventoryResult, error)
DeleteBucketInventory Deletes an inventory for a bucket.
func (*Client) DeleteBucketLifecycle ¶ added in v1.1.0
func (c *Client) DeleteBucketLifecycle(ctx context.Context, request *DeleteBucketLifecycleRequest, optFns ...func(*Options)) (*DeleteBucketLifecycleResult, error)
DeleteBucketLifecycle Deletes the lifecycle rules of a bucket.
func (*Client) DeleteBucketLogging ¶ added in v1.1.0
func (c *Client) DeleteBucketLogging(ctx context.Context, request *DeleteBucketLoggingRequest, optFns ...func(*Options)) (*DeleteBucketLoggingResult, error)
DeleteBucketLogging Disables the logging feature for a bucket.
func (*Client) DeleteBucketPolicy ¶ added in v1.1.0
func (c *Client) DeleteBucketPolicy(ctx context.Context, request *DeleteBucketPolicyRequest, optFns ...func(*Options)) (*DeleteBucketPolicyResult, error)
DeleteBucketPolicy Deletes a policy for a bucket.
func (*Client) DeleteBucketPublicAccessBlock ¶ added in v1.1.0
func (c *Client) DeleteBucketPublicAccessBlock(ctx context.Context, request *DeleteBucketPublicAccessBlockRequest, optFns ...func(*Options)) (*DeleteBucketPublicAccessBlockResult, error)
DeleteBucketPublicAccessBlock Deletes the Block Public Access configurations of a bucket.
func (*Client) DeleteBucketReplication ¶ added in v1.1.0
func (c *Client) DeleteBucketReplication(ctx context.Context, request *DeleteBucketReplicationRequest, optFns ...func(*Options)) (*DeleteBucketReplicationResult, error)
DeleteBucketReplication Disables data replication for a bucket and deletes the data replication rule configured for the bucket. After you call this operation, all operations performed on the source bucket are not synchronized to the destination bucket.
func (*Client) DeleteBucketTags ¶ added in v1.1.0
func (c *Client) DeleteBucketTags(ctx context.Context, request *DeleteBucketTagsRequest, optFns ...func(*Options)) (*DeleteBucketTagsResult, error)
DeleteBucketTags Deletes tags configured for a bucket.
func (*Client) DeleteBucketWebsite ¶ added in v1.1.0
func (c *Client) DeleteBucketWebsite(ctx context.Context, request *DeleteBucketWebsiteRequest, optFns ...func(*Options)) (*DeleteBucketWebsiteResult, error)
DeleteBucketWebsite Disables the static website hosting mode and deletes the redirection rules for a bucket.
func (*Client) DeleteCname ¶ added in v1.1.1
func (c *Client) DeleteCname(ctx context.Context, request *DeleteCnameRequest, optFns ...func(*Options)) (*DeleteCnameResult, error)
DeleteCname Deletes a CNAME record that is mapped to a bucket.
func (*Client) DeleteMultipleObjects ¶
func (c *Client) DeleteMultipleObjects(ctx context.Context, request *DeleteMultipleObjectsRequest, optFns ...func(*Options)) (*DeleteMultipleObjectsResult, error)
DeleteMultipleObjects Deletes multiple objects from a bucket.
func (*Client) DeleteObject ¶
func (c *Client) DeleteObject(ctx context.Context, request *DeleteObjectRequest, optFns ...func(*Options)) (*DeleteObjectResult, error)
DeleteObject Deletes an object.
func (*Client) DeleteObjectTagging ¶
func (c *Client) DeleteObjectTagging(ctx context.Context, request *DeleteObjectTaggingRequest, optFns ...func(*Options)) (*DeleteObjectTaggingResult, error)
DeleteObjectTagging You can call this operation to delete the tags of a specified object.
func (*Client) DeletePublicAccessBlock ¶ added in v1.1.0
func (c *Client) DeletePublicAccessBlock(ctx context.Context, request *DeletePublicAccessBlockRequest, optFns ...func(*Options)) (*DeletePublicAccessBlockResult, error)
DeletePublicAccessBlock Deletes the Block Public Access configurations of OSS resources.
func (*Client) DeleteStyle ¶ added in v1.1.0
func (c *Client) DeleteStyle(ctx context.Context, request *DeleteStyleRequest, optFns ...func(*Options)) (*DeleteStyleResult, error)
DeleteStyle Deletes an image style from a bucket.
func (*Client) DeleteUserDefinedLogFieldsConfig ¶ added in v1.1.0
func (c *Client) DeleteUserDefinedLogFieldsConfig(ctx context.Context, request *DeleteUserDefinedLogFieldsConfigRequest, optFns ...func(*Options)) (*DeleteUserDefinedLogFieldsConfigResult, error)
DeleteUserDefinedLogFieldsConfig Deletes the custom configurations of the user_defined_log_fields field in the real-time logs of a bucket.
func (*Client) DoMetaQuery ¶ added in v1.1.2
func (c *Client) DoMetaQuery(ctx context.Context, request *DoMetaQueryRequest, optFns ...func(*Options)) (*DoMetaQueryResult, error)
DoMetaQuery Queries the objects in a bucket that meet the specified conditions by using the data indexing feature. The information about the objects is listed based on the specified fields and sorting methods.
func (*Client) ExtendBucketWorm ¶ added in v1.1.0
func (c *Client) ExtendBucketWorm(ctx context.Context, request *ExtendBucketWormRequest, optFns ...func(*Options)) (*ExtendBucketWormResult, error)
ExtendBucketWorm Extends the retention period of objects in a bucket for which a retention policy is locked.
func (*Client) GetAccessPoint ¶ added in v1.1.2
func (c *Client) GetAccessPoint(ctx context.Context, request *GetAccessPointRequest, optFns ...func(*Options)) (*GetAccessPointResult, error)
GetAccessPoint Queries the information about an access point.
func (*Client) GetAccessPointPolicy ¶ added in v1.1.2
func (c *Client) GetAccessPointPolicy(ctx context.Context, request *GetAccessPointPolicyRequest, optFns ...func(*Options)) (*GetAccessPointPolicyResult, error)
GetAccessPointPolicy Queries the configurations of an access point policy.
func (*Client) GetAccessPointPublicAccessBlock ¶ added in v1.1.2
func (c *Client) GetAccessPointPublicAccessBlock(ctx context.Context, request *GetAccessPointPublicAccessBlockRequest, optFns ...func(*Options)) (*GetAccessPointPublicAccessBlockResult, error)
GetAccessPointPublicAccessBlock Queries the Block Public Access configurations of an access point.
func (*Client) GetBucketAccessMonitor ¶ added in v1.1.0
func (c *Client) GetBucketAccessMonitor(ctx context.Context, request *GetBucketAccessMonitorRequest, optFns ...func(*Options)) (*GetBucketAccessMonitorResult, error)
GetBucketAccessMonitor Queries the access tracking status of a bucket.
func (*Client) GetBucketAcl ¶
func (c *Client) GetBucketAcl(ctx context.Context, request *GetBucketAclRequest, optFns ...func(*Options)) (*GetBucketAclResult, error)
GetBucketAcl You can call this operation to query the ACL of a bucket.
func (*Client) GetBucketArchiveDirectRead ¶ added in v1.1.0
func (c *Client) GetBucketArchiveDirectRead(ctx context.Context, request *GetBucketArchiveDirectReadRequest, optFns ...func(*Options)) (*GetBucketArchiveDirectReadResult, error)
GetBucketArchiveDirectRead Queries whether real-time access of Archive objects is enabled for a bucket.
func (*Client) GetBucketCors ¶ added in v1.1.0
func (c *Client) GetBucketCors(ctx context.Context, request *GetBucketCorsRequest, optFns ...func(*Options)) (*GetBucketCorsResult, error)
GetBucketCors Queries the cross-origin resource sharing (CORS) rules that are configured for a bucket.
func (*Client) GetBucketEncryption ¶ added in v1.1.0
func (c *Client) GetBucketEncryption(ctx context.Context, request *GetBucketEncryptionRequest, optFns ...func(*Options)) (*GetBucketEncryptionResult, error)
GetBucketEncryption Queries the encryption rules configured for a bucket.
func (*Client) GetBucketHttpsConfig ¶ added in v1.1.0
func (c *Client) GetBucketHttpsConfig(ctx context.Context, request *GetBucketHttpsConfigRequest, optFns ...func(*Options)) (*GetBucketHttpsConfigResult, error)
GetBucketHttpsConfig Queries the Transport Layer Security (TLS) version configurations of a bucket.
func (*Client) GetBucketInfo ¶
func (c *Client) GetBucketInfo(ctx context.Context, request *GetBucketInfoRequest, optFns ...func(*Options)) (*GetBucketInfoResult, error)
GetBucketInfo Queries information about a bucket.
func (*Client) GetBucketInventory ¶ added in v1.1.0
func (c *Client) GetBucketInventory(ctx context.Context, request *GetBucketInventoryRequest, optFns ...func(*Options)) (*GetBucketInventoryResult, error)
GetBucketInventory Queries the inventories that are configured for a bucket.
func (*Client) GetBucketLifecycle ¶ added in v1.1.0
func (c *Client) GetBucketLifecycle(ctx context.Context, request *GetBucketLifecycleRequest, optFns ...func(*Options)) (*GetBucketLifecycleResult, error)
GetBucketLifecycle Queries the lifecycle rules configured for a bucket. Only the owner of a bucket has the permissions to query the lifecycle rules configured for the bucket.
func (*Client) GetBucketLocation ¶
func (c *Client) GetBucketLocation(ctx context.Context, request *GetBucketLocationRequest, optFns ...func(*Options)) (*GetBucketLocationResult, error)
GetBucketLocation Queries the region of an Object Storage Service (OSS) bucket.
func (*Client) GetBucketLogging ¶ added in v1.1.0
func (c *Client) GetBucketLogging(ctx context.Context, request *GetBucketLoggingRequest, optFns ...func(*Options)) (*GetBucketLoggingResult, error)
GetBucketLogging Queries the configurations of access log collection of a bucket. Only the owner of a bucket can query the configurations of access log collection of the bucket.
func (*Client) GetBucketPolicy ¶ added in v1.1.0
func (c *Client) GetBucketPolicy(ctx context.Context, request *GetBucketPolicyRequest, optFns ...func(*Options)) (*GetBucketPolicyResult, error)
GetBucketPolicy Queries the policies configured for a bucket.
func (*Client) GetBucketPolicyStatus ¶ added in v1.1.0
func (c *Client) GetBucketPolicyStatus(ctx context.Context, request *GetBucketPolicyStatusRequest, optFns ...func(*Options)) (*GetBucketPolicyStatusResult, error)
GetBucketPolicyStatus Checks whether the current bucket policy allows public access.
func (*Client) GetBucketPublicAccessBlock ¶ added in v1.1.0
func (c *Client) GetBucketPublicAccessBlock(ctx context.Context, request *GetBucketPublicAccessBlockRequest, optFns ...func(*Options)) (*GetBucketPublicAccessBlockResult, error)
GetBucketPublicAccessBlock Queries the Block Public Access configurations of a bucket.
func (*Client) GetBucketReferer ¶ added in v1.1.0
func (c *Client) GetBucketReferer(ctx context.Context, request *GetBucketRefererRequest, optFns ...func(*Options)) (*GetBucketRefererResult, error)
GetBucketReferer Queries the hotlink protection configurations for a bucket.
func (*Client) GetBucketReplication ¶ added in v1.1.0
func (c *Client) GetBucketReplication(ctx context.Context, request *GetBucketReplicationRequest, optFns ...func(*Options)) (*GetBucketReplicationResult, error)
GetBucketReplication Queries the data replication rules configured for a bucket.
func (*Client) GetBucketReplicationLocation ¶ added in v1.1.0
func (c *Client) GetBucketReplicationLocation(ctx context.Context, request *GetBucketReplicationLocationRequest, optFns ...func(*Options)) (*GetBucketReplicationLocationResult, error)
GetBucketReplicationLocation Queries the regions in which available destination buckets reside. You can determine the region of the destination bucket to which the data in the source bucket are replicated based on the returned response.
func (*Client) GetBucketReplicationProgress ¶ added in v1.1.0
func (c *Client) GetBucketReplicationProgress(ctx context.Context, request *GetBucketReplicationProgressRequest, optFns ...func(*Options)) (*GetBucketReplicationProgressResult, error)
GetBucketReplicationProgress Queries the information about the data replication process of a bucket.
func (*Client) GetBucketRequestPayment ¶
func (c *Client) GetBucketRequestPayment(ctx context.Context, request *GetBucketRequestPaymentRequest, optFns ...func(*Options)) (*GetBucketRequestPaymentResult, error)
GetBucketRequestPayment You can call this operation to obtain pay-by-requester configurations for a bucket.
func (*Client) GetBucketResourceGroup ¶ added in v1.1.0
func (c *Client) GetBucketResourceGroup(ctx context.Context, request *GetBucketResourceGroupRequest, optFns ...func(*Options)) (*GetBucketResourceGroupResult, error)
GetBucketResourceGroup Queries the ID of the resource group to which a bucket belongs.
func (*Client) GetBucketStat ¶
func (c *Client) GetBucketStat(ctx context.Context, request *GetBucketStatRequest, optFns ...func(*Options)) (*GetBucketStatResult, error)
GetBucketStat Queries the storage capacity of a specified bucket and the number of objects that are stored in the bucket.
func (*Client) GetBucketTags ¶ added in v1.1.0
func (c *Client) GetBucketTags(ctx context.Context, request *GetBucketTagsRequest, optFns ...func(*Options)) (*GetBucketTagsResult, error)
GetBucketTags Queries the tags of a bucket.
func (*Client) GetBucketTransferAcceleration ¶ added in v1.1.0
func (c *Client) GetBucketTransferAcceleration(ctx context.Context, request *GetBucketTransferAccelerationRequest, optFns ...func(*Options)) (*GetBucketTransferAccelerationResult, error)
GetBucketTransferAcceleration Queries the transfer acceleration configurations of a bucket.
func (*Client) GetBucketVersioning ¶
func (c *Client) GetBucketVersioning(ctx context.Context, request *GetBucketVersioningRequest, optFns ...func(*Options)) (*GetBucketVersioningResult, error)
GetBucketVersioning You can call this operation to query the versioning state of a bucket.
func (*Client) GetBucketWebsite ¶ added in v1.1.0
func (c *Client) GetBucketWebsite(ctx context.Context, request *GetBucketWebsiteRequest, optFns ...func(*Options)) (*GetBucketWebsiteResult, error)
GetBucketWebsite Queries the static website hosting status and redirection rules configured for a bucket.
func (*Client) GetBucketWorm ¶ added in v1.1.0
func (c *Client) GetBucketWorm(ctx context.Context, request *GetBucketWormRequest, optFns ...func(*Options)) (*GetBucketWormResult, error)
GetBucketWorm Queries the retention policy configured for a bucket.
func (*Client) GetCnameToken ¶ added in v1.1.1
func (c *Client) GetCnameToken(ctx context.Context, request *GetCnameTokenRequest, optFns ...func(*Options)) (*GetCnameTokenResult, error)
GetCnameToken Queries the created CNAME tokens.
func (*Client) GetMetaQueryStatus ¶ added in v1.1.2
func (c *Client) GetMetaQueryStatus(ctx context.Context, request *GetMetaQueryStatusRequest, optFns ...func(*Options)) (*GetMetaQueryStatusResult, error)
GetMetaQueryStatus Queries the information about the metadata index library of a bucket.
func (*Client) GetObject ¶
func (c *Client) GetObject(ctx context.Context, request *GetObjectRequest, optFns ...func(*Options)) (*GetObjectResult, error)
func (*Client) GetObjectAcl ¶
func (c *Client) GetObjectAcl(ctx context.Context, request *GetObjectAclRequest, optFns ...func(*Options)) (*GetObjectAclResult, error)
GetObjectAcl Queries the access control list (ACL) of an object in a bucket.
func (*Client) GetObjectMeta ¶
func (c *Client) GetObjectMeta(ctx context.Context, request *GetObjectMetaRequest, optFns ...func(*Options)) (*GetObjectMetaResult, error)
GetObjectMeta Queries the metadata of an object, including ETag, Size, and LastModified. The content of the object is not returned.
func (*Client) GetObjectTagging ¶
func (c *Client) GetObjectTagging(ctx context.Context, request *GetObjectTaggingRequest, optFns ...func(*Options)) (*GetObjectTaggingResult, error)
GetObjectTagging You can call this operation to query the tags of an object.
func (*Client) GetObjectToFile ¶
func (c *Client) GetObjectToFile(ctx context.Context, request *GetObjectRequest, filePath string, optFns ...func(*Options)) (*GetObjectResult, error)
GetObjectToFile downloads the object into a local file.
func (*Client) GetPublicAccessBlock ¶ added in v1.1.0
func (c *Client) GetPublicAccessBlock(ctx context.Context, request *GetPublicAccessBlockRequest, optFns ...func(*Options)) (*GetPublicAccessBlockResult, error)
GetPublicAccessBlock Queries the Block Public Access configurations of OSS resources.
func (*Client) GetStyle ¶ added in v1.1.0
func (c *Client) GetStyle(ctx context.Context, request *GetStyleRequest, optFns ...func(*Options)) (*GetStyleResult, error)
GetStyle Queries the information about an image style of a bucket.
func (*Client) GetSymlink ¶
func (c *Client) GetSymlink(ctx context.Context, request *GetSymlinkRequest, optFns ...func(*Options)) (*GetSymlinkResult, error)
GetSymlink Obtains a symbol link. To perform GetSymlink operations, you must have the read permission on the symbol link.
func (*Client) GetUserDefinedLogFieldsConfig ¶ added in v1.1.0
func (c *Client) GetUserDefinedLogFieldsConfig(ctx context.Context, request *GetUserDefinedLogFieldsConfigRequest, optFns ...func(*Options)) (*GetUserDefinedLogFieldsConfigResult, error)
GetUserDefinedLogFieldsConfig Queries the custom configurations of the user_defined_log_fields field in the real-time logs of a bucket.
func (*Client) HeadObject ¶
func (c *Client) HeadObject(ctx context.Context, request *HeadObjectRequest, optFns ...func(*Options)) (*HeadObjectResult, error)
HeadObject Queries information about all objects in a bucket.
func (*Client) InitiateBucketWorm ¶ added in v1.1.0
func (c *Client) InitiateBucketWorm(ctx context.Context, request *InitiateBucketWormRequest, optFns ...func(*Options)) (*InitiateBucketWormResult, error)
InitiateBucketWorm Creates a retention policy.
func (*Client) InitiateMultipartUpload ¶
func (c *Client) InitiateMultipartUpload(ctx context.Context, request *InitiateMultipartUploadRequest, optFns ...func(*Options)) (*InitiateMultipartUploadResult, error)
InitiateMultipartUpload Initiates a multipart upload task before you can upload data in parts to Object Storage Service (OSS).
func (*Client) InvokeOperation ¶
func (c *Client) InvokeOperation(ctx context.Context, input *OperationInput, optFns ...func(*Options)) (*OperationOutput, error)
func (*Client) IsBucketExist ¶
func (c *Client) IsBucketExist(ctx context.Context, bucket string, optFns ...func(*Options)) (bool, error)
IsBucketExist checks if the bucket exists.
func (*Client) IsObjectExist ¶
func (c *Client) IsObjectExist(ctx context.Context, bucket string, key string, optFns ...func(*IsObjectExistOptions)) (bool, error)
IsObjectExist checks if the object exists.
func (*Client) ListAccessPoints ¶ added in v1.1.2
func (c *Client) ListAccessPoints(ctx context.Context, request *ListAccessPointsRequest, optFns ...func(*Options)) (*ListAccessPointsResult, error)
ListAccessPoints Queries the information about user-level or bucket-level access points.
func (*Client) ListBucketInventory ¶ added in v1.1.0
func (c *Client) ListBucketInventory(ctx context.Context, request *ListBucketInventoryRequest, optFns ...func(*Options)) (*ListBucketInventoryResult, error)
ListBucketInventory Queries all inventories in a bucket at a time.
func (*Client) ListBuckets ¶
func (c *Client) ListBuckets(ctx context.Context, request *ListBucketsRequest, optFns ...func(*Options)) (*ListBucketsResult, error)
ListBuckets Lists buckets that belong to the current account.
func (*Client) ListCname ¶ added in v1.1.1
func (c *Client) ListCname(ctx context.Context, request *ListCnameRequest, optFns ...func(*Options)) (*ListCnameResult, error)
ListCname Queries all CNAME records that are mapped to a bucket.
func (*Client) ListMultipartUploads ¶
func (c *Client) ListMultipartUploads(ctx context.Context, request *ListMultipartUploadsRequest, optFns ...func(*Options)) (*ListMultipartUploadsResult, error)
ListMultipartUploads Lists all multipart upload tasks in progress. The tasks are not completed or canceled.
func (*Client) ListObjectVersions ¶
func (c *Client) ListObjectVersions(ctx context.Context, request *ListObjectVersionsRequest, optFns ...func(*Options)) (*ListObjectVersionsResult, error)
ListObjectVersions Lists the versions of all objects in a bucket, including delete markers.
func (*Client) ListObjects ¶
func (c *Client) ListObjects(ctx context.Context, request *ListObjectsRequest, optFns ...func(*Options)) (*ListObjectsResult, error)
ListObjects Lists the information about all objects in a bucket.
func (*Client) ListObjectsV2 ¶
func (c *Client) ListObjectsV2(ctx context.Context, request *ListObjectsV2Request, optFns ...func(*Options)) (*ListObjectsV2Result, error)
ListObjectsV2 Queries information about all objects in a bucket.
func (*Client) ListParts ¶
func (c *Client) ListParts(ctx context.Context, request *ListPartsRequest, optFns ...func(*Options)) (*ListPartsResult, error)
ListParts Lists all parts that are uploaded by using a specified upload ID.
func (*Client) ListStyle ¶ added in v1.1.0
func (c *Client) ListStyle(ctx context.Context, request *ListStyleRequest, optFns ...func(*Options)) (*ListStyleResult, error)
ListStyle Queries all image styles that are created for a bucket.
func (*Client) NewCopier ¶
func (c *Client) NewCopier(optFns ...func(*CopierOptions)) *Copier
NewCopier creates a new Copier instance to copy objects.
func (*Client) NewDownloader ¶
func (c *Client) NewDownloader(optFns ...func(*DownloaderOptions)) *Downloader
NewDownloader creates a new Downloader instance to download objects.
func (*Client) NewListBucketsPaginator ¶
func (c *Client) NewListBucketsPaginator(request *ListBucketsRequest, optFns ...func(*PaginatorOptions)) *ListBucketsPaginator
func (*Client) NewListMultipartUploadsPaginator ¶
func (c *Client) NewListMultipartUploadsPaginator(request *ListMultipartUploadsRequest, optFns ...func(*PaginatorOptions)) *ListMultipartUploadsPaginator
func (*Client) NewListObjectVersionsPaginator ¶
func (c *Client) NewListObjectVersionsPaginator(request *ListObjectVersionsRequest, optFns ...func(*PaginatorOptions)) *ListObjectVersionsPaginator
func (*Client) NewListObjectsPaginator ¶
func (c *Client) NewListObjectsPaginator(request *ListObjectsRequest, optFns ...func(*PaginatorOptions)) *ListObjectsPaginator
func (*Client) NewListObjectsV2Paginator ¶
func (c *Client) NewListObjectsV2Paginator(request *ListObjectsV2Request, optFns ...func(*PaginatorOptions)) *ListObjectsV2Paginator
func (*Client) NewListPartsPaginator ¶
func (c *Client) NewListPartsPaginator(request *ListPartsRequest, optFns ...func(*PaginatorOptions)) *ListPartsPaginator
func (*Client) NewUploader ¶
func (c *Client) NewUploader(optFns ...func(*UploaderOptions)) *Uploader
NewUploader creates a new Uploader instance to upload objects.
func (*Client) OpenFile ¶
func (c *Client) OpenFile(ctx context.Context, bucket string, key string, optFns ...func(*OpenOptions)) (*ReadOnlyFile, error)
OpenFile opens the named file for reading.
func (*Client) OpenMetaQuery ¶ added in v1.1.2
func (c *Client) OpenMetaQuery(ctx context.Context, request *OpenMetaQueryRequest, optFns ...func(*Options)) (*OpenMetaQueryResult, error)
OpenMetaQuery Enables metadata management for a bucket. After you enable the metadata management feature for a bucket, Object Storage Service (OSS) creates a metadata index library for the bucket and creates metadata indexes for all objects in the bucket. After the metadata index library is created, OSS continues to perform quasi-real-time scans on incremental objects in the bucket and creates metadata indexes for the incremental objects.
func (*Client) OptionObject ¶ added in v1.1.0
func (c *Client) OptionObject(ctx context.Context, request *OptionObjectRequest, optFns ...func(*Options)) (*OptionObjectResult, error)
OptionObject Determines whether to send a cross-origin request. Before a cross-origin request is sent, the browser sends a preflight OPTIONS request that includes a specific origin, HTTP method, and header information to Object Storage Service (OSS) to determine whether to send the cross-origin request.
func (*Client) Presign ¶
func (c *Client) Presign(ctx context.Context, request any, optFns ...func(*PresignOptions)) (*PresignResult, error)
func (*Client) ProcessObject ¶
func (c *Client) ProcessObject(ctx context.Context, request *ProcessObjectRequest, optFns ...func(*Options)) (*ProcessObjectResult, error)
ProcessObject apply process on the specified image file.
func (*Client) PutAccessPointPolicy ¶ added in v1.1.2
func (c *Client) PutAccessPointPolicy(ctx context.Context, request *PutAccessPointPolicyRequest, optFns ...func(*Options)) (*PutAccessPointPolicyResult, error)
PutAccessPointPolicy Configures an access point policy.
func (*Client) PutAccessPointPublicAccessBlock ¶ added in v1.1.2
func (c *Client) PutAccessPointPublicAccessBlock(ctx context.Context, request *PutAccessPointPublicAccessBlockRequest, optFns ...func(*Options)) (*PutAccessPointPublicAccessBlockResult, error)
PutAccessPointPublicAccessBlock Enables or disables Block Public Access for an access point.
func (*Client) PutBucket ¶
func (c *Client) PutBucket(ctx context.Context, request *PutBucketRequest, optFns ...func(*Options)) (*PutBucketResult, error)
PutBucket Creates a bucket.
func (*Client) PutBucketAccessMonitor ¶ added in v1.1.0
func (c *Client) PutBucketAccessMonitor(ctx context.Context, request *PutBucketAccessMonitorRequest, optFns ...func(*Options)) (*PutBucketAccessMonitorResult, error)
PutBucketAccessMonitor Modifies the access tracking status of a bucket.
func (*Client) PutBucketAcl ¶
func (c *Client) PutBucketAcl(ctx context.Context, request *PutBucketAclRequest, optFns ...func(*Options)) (*PutBucketAclResult, error)
PutBucketAcl You can call this operation to configure or modify the ACL of a bucket.
func (*Client) PutBucketArchiveDirectRead ¶ added in v1.1.0
func (c *Client) PutBucketArchiveDirectRead(ctx context.Context, request *PutBucketArchiveDirectReadRequest, optFns ...func(*Options)) (*PutBucketArchiveDirectReadResult, error)
PutBucketArchiveDirectRead Enables or disables real-time access of Archive objects for a bucket.
func (*Client) PutBucketCors ¶ added in v1.1.0
func (c *Client) PutBucketCors(ctx context.Context, request *PutBucketCorsRequest, optFns ...func(*Options)) (*PutBucketCorsResult, error)
PutBucketCors Configures cross-origin resource sharing (CORS) rules for a bucket.
func (*Client) PutBucketEncryption ¶ added in v1.1.0
func (c *Client) PutBucketEncryption(ctx context.Context, request *PutBucketEncryptionRequest, optFns ...func(*Options)) (*PutBucketEncryptionResult, error)
PutBucketEncryption Configures encryption rules for a bucket.
func (*Client) PutBucketHttpsConfig ¶ added in v1.1.0
func (c *Client) PutBucketHttpsConfig(ctx context.Context, request *PutBucketHttpsConfigRequest, optFns ...func(*Options)) (*PutBucketHttpsConfigResult, error)
PutBucketHttpsConfig Enables or disables Transport Layer Security (TLS) version management for a bucket.
func (*Client) PutBucketInventory ¶ added in v1.1.0
func (c *Client) PutBucketInventory(ctx context.Context, request *PutBucketInventoryRequest, optFns ...func(*Options)) (*PutBucketInventoryResult, error)
PutBucketInventory Configures an inventory for a bucket.
func (*Client) PutBucketLifecycle ¶ added in v1.1.0
func (c *Client) PutBucketLifecycle(ctx context.Context, request *PutBucketLifecycleRequest, optFns ...func(*Options)) (*PutBucketLifecycleResult, error)
PutBucketLifecycle Configures a lifecycle rule for a bucket. After you configure a lifecycle rule for a bucket, Object Storage Service (OSS) automatically deletes the objects that match the rule or converts the storage type of the objects based on the point in time that is specified in the lifecycle rule.
func (*Client) PutBucketLogging ¶ added in v1.1.0
func (c *Client) PutBucketLogging(ctx context.Context, request *PutBucketLoggingRequest, optFns ...func(*Options)) (*PutBucketLoggingResult, error)
PutBucketLogging Enables logging for a bucket. After you enable logging for a bucket, Object Storage Service (OSS) generates logs every hour based on the defined naming rule and stores the logs as objects in the specified destination bucket.
func (*Client) PutBucketPolicy ¶ added in v1.1.0
func (c *Client) PutBucketPolicy(ctx context.Context, request *PutBucketPolicyRequest, optFns ...func(*Options)) (*PutBucketPolicyResult, error)
PutBucketPolicy Configures a policy for a bucket.
func (*Client) PutBucketPublicAccessBlock ¶ added in v1.1.0
func (c *Client) PutBucketPublicAccessBlock(ctx context.Context, request *PutBucketPublicAccessBlockRequest, optFns ...func(*Options)) (*PutBucketPublicAccessBlockResult, error)
PutBucketPublicAccessBlock Enables or disables Block Public Access for a bucket.
func (*Client) PutBucketReferer ¶ added in v1.1.0
func (c *Client) PutBucketReferer(ctx context.Context, request *PutBucketRefererRequest, optFns ...func(*Options)) (*PutBucketRefererResult, error)
PutBucketReferer Configures a Referer whitelist for an Object Storage Service (OSS) bucket. You can specify whether to allow the requests whose Referer field is empty or whose query strings are truncated.
func (*Client) PutBucketReplication ¶ added in v1.1.0
func (c *Client) PutBucketReplication(ctx context.Context, request *PutBucketReplicationRequest, optFns ...func(*Options)) (*PutBucketReplicationResult, error)
PutBucketReplication Configures data replication rules for a bucket. Object Storage Service (OSS) supports cross-region replication (CRR) and same-region replication (SRR).
func (*Client) PutBucketRequestPayment ¶
func (c *Client) PutBucketRequestPayment(ctx context.Context, request *PutBucketRequestPaymentRequest, optFns ...func(*Options)) (*PutBucketRequestPaymentResult, error)
PutBucketRequestPayment You can call this operation to enable pay-by-requester for a bucket.
func (*Client) PutBucketResourceGroup ¶ added in v1.1.0
func (c *Client) PutBucketResourceGroup(ctx context.Context, request *PutBucketResourceGroupRequest, optFns ...func(*Options)) (*PutBucketResourceGroupResult, error)
PutBucketResourceGroup Modifies the ID of the resource group to which a bucket belongs.
func (*Client) PutBucketRtc ¶ added in v1.1.0
func (c *Client) PutBucketRtc(ctx context.Context, request *PutBucketRtcRequest, optFns ...func(*Options)) (*PutBucketRtcResult, error)
PutBucketRtc Enables or disables the Replication Time Control (RTC) feature for existing cross-region replication (CRR) rules.
func (*Client) PutBucketTags ¶ added in v1.1.0
func (c *Client) PutBucketTags(ctx context.Context, request *PutBucketTagsRequest, optFns ...func(*Options)) (*PutBucketTagsResult, error)
PutBucketTags Adds tags to or modifies the existing tags of a bucket.
func (*Client) PutBucketTransferAcceleration ¶ added in v1.1.0
func (c *Client) PutBucketTransferAcceleration(ctx context.Context, request *PutBucketTransferAccelerationRequest, optFns ...func(*Options)) (*PutBucketTransferAccelerationResult, error)
PutBucketTransferAcceleration Configures transfer acceleration for a bucket. After you enable transfer acceleration for a bucket, the object access speed is accelerated for users worldwide. The transfer acceleration feature is applicable to scenarios where data needs to be transferred over long geographical distances. This feature can also be used to download or upload objects that are gigabytes or terabytes in size.
func (*Client) PutBucketVersioning ¶
func (c *Client) PutBucketVersioning(ctx context.Context, request *PutBucketVersioningRequest, optFns ...func(*Options)) (*PutBucketVersioningResult, error)
PutBucketVersioning Configures the versioning state for a bucket.
func (*Client) PutBucketWebsite ¶ added in v1.1.0
func (c *Client) PutBucketWebsite(ctx context.Context, request *PutBucketWebsiteRequest, optFns ...func(*Options)) (*PutBucketWebsiteResult, error)
PutBucketWebsite Enables the static website hosting mode for a bucket and configures redirection rules for the bucket.
func (*Client) PutCname ¶ added in v1.1.1
func (c *Client) PutCname(ctx context.Context, request *PutCnameRequest, optFns ...func(*Options)) (*PutCnameResult, error)
PutCname Maps a CNAME record to a bucket.
func (*Client) PutObject ¶
func (c *Client) PutObject(ctx context.Context, request *PutObjectRequest, optFns ...func(*Options)) (*PutObjectResult, error)
PutObject Uploads a object.
func (*Client) PutObjectAcl ¶
func (c *Client) PutObjectAcl(ctx context.Context, request *PutObjectAclRequest, optFns ...func(*Options)) (*PutObjectAclResult, error)
PutObjectAcl You can call this operation to modify the access control list (ACL) of an object.
func (*Client) PutObjectFromFile ¶
func (c *Client) PutObjectFromFile(ctx context.Context, request *PutObjectRequest, filePath string, optFns ...func(*Options)) (*PutObjectResult, error)
PutObjectFromFile creates a new object from the local file.
func (*Client) PutObjectTagging ¶
func (c *Client) PutObjectTagging(ctx context.Context, request *PutObjectTaggingRequest, optFns ...func(*Options)) (*PutObjectTaggingResult, error)
PutObjectTagging Adds tags to an object or updates the tags added to the object. Each tag added to an object is a key-value pair.
func (*Client) PutPublicAccessBlock ¶ added in v1.1.0
func (c *Client) PutPublicAccessBlock(ctx context.Context, request *PutPublicAccessBlockRequest, optFns ...func(*Options)) (*PutPublicAccessBlockResult, error)
PutPublicAccessBlock Enables or disables Block Public Access for Object Storage Service (OSS) resources.
func (*Client) PutStyle ¶ added in v1.1.0
func (c *Client) PutStyle(ctx context.Context, request *PutStyleRequest, optFns ...func(*Options)) (*PutStyleResult, error)
PutStyle Adds an image style to a bucket. An image style contains one or more image processing parameters.
func (*Client) PutSymlink ¶
func (c *Client) PutSymlink(ctx context.Context, request *PutSymlinkRequest, optFns ...func(*Options)) (*PutSymlinkResult, error)
PutSymlink Creates a symbolic link that points to a destination object. You can use the symbolic link to access the destination object.
func (*Client) PutUserDefinedLogFieldsConfig ¶ added in v1.1.0
func (c *Client) PutUserDefinedLogFieldsConfig(ctx context.Context, request *PutUserDefinedLogFieldsConfigRequest, optFns ...func(*Options)) (*PutUserDefinedLogFieldsConfigResult, error)
PutUserDefinedLogFieldsConfig Customizes the user_defined_log_fields field in real-time logs by adding custom request headers or query parameters to the field for subsequent analysis of requests.
func (*Client) RestoreObject ¶
func (c *Client) RestoreObject(ctx context.Context, request *RestoreObjectRequest, optFns ...func(*Options)) (*RestoreObjectResult, error)
RestoreObject Restores Archive, Cold Archive, or Deep Cold Archive objects.
func (*Client) SelectObject ¶
func (c *Client) SelectObject(ctx context.Context, request *SelectObjectRequest, optFns ...func(*Options)) (*SelectObjectResult, error)
SelectObject Executes SQL statements to perform operations on an object and obtains the execution results.
func (*Client) UploadPart ¶
func (c *Client) UploadPart(ctx context.Context, request *UploadPartRequest, optFns ...func(*Options)) (*UploadPartResult, error)
UploadPart Call the UploadPart interface to upload data in blocks (parts) based on the specified Object name and uploadId.
func (*Client) UploadPartCopy ¶
func (c *Client) UploadPartCopy(ctx context.Context, request *UploadPartCopyRequest, optFns ...func(*Options)) (*UploadPartCopyResult, error)
UploadPartCopy You can call this operation to copy data from an existing object to upload a part by adding a x-oss-copy-request header to UploadPart.
type ClientError ¶
func (*ClientError) Error ¶
func (e *ClientError) Error() string
func (*ClientError) Unwrap ¶
func (e *ClientError) Unwrap() error
type CloseMetaQueryRequest ¶ added in v1.1.2
type CloseMetaQueryRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type CloseMetaQueryResult ¶ added in v1.1.2
type CloseMetaQueryResult struct {
ResultCommon
}
type CnameCertificate ¶ added in v1.1.1
type CnameCertificate struct { // The time when the certificate was bound. CreationDate *string `xml:"CreationDate"` // The signature of the certificate. Fingerprint *string `xml:"Fingerprint"` // The time when the certificate takes effect. ValidStartDate *string `xml:"ValidStartDate"` // The time when the certificate expires. ValidEndDate *string `xml:"ValidEndDate"` // The source of the certificate.Valid values:* CAS * Upload Type *string `xml:"Type"` // The ID of the certificate. CertId *string `xml:"CertId"` // The status of the certificate.Valid values:* Enabled * Disabled Status *string `xml:"Status"` }
type CnameInfo ¶ added in v1.1.1
type CnameInfo struct { // The custom domain name. Domain *string `xml:"Domain"` // The time when the custom domain name was mapped. LastModified *string `xml:"LastModified"` // The status of the domain name. Valid values:* Enabled* Disabled Status *string `xml:"Status"` // The container in which the certificate information is stored. Certificate *CnameCertificate `xml:"Certificate"` }
type CnameToken ¶ added in v1.1.1
type CnameToken struct { // The name of the bucket to which the CNAME record is mapped. Bucket *string `xml:"Bucket"` // The name of the CNAME record that is mapped to the bucket. Cname *string `xml:"Cname"` // The CNAME token that is returned by OSS. Token *string `xml:"Token"` // The time when the CNAME token expires. ExpireTime *string `xml:"ExpireTime"` }
type CommonPrefix ¶
type CommonPrefix struct { // The prefix contained in the returned object names. Prefix *string `xml:"Prefix"` }
type CompleteBucketWormRequest ¶ added in v1.1.0
type CompleteBucketWormRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The ID of the retention policy. WormId *string `input:"query,wormId,required"` RequestCommon }
type CompleteBucketWormResult ¶ added in v1.1.0
type CompleteBucketWormResult struct {
ResultCommon
}
type CompleteMultipartUpload ¶
type CompleteMultipartUpload struct {
Parts []UploadPart `xml:"Part"`
}
type CompleteMultipartUploadRequest ¶
type CompleteMultipartUploadRequest struct { // The name of the bucket. Bucket *string `input:"host,uploadId,required"` // The name of the object. Key *string `input:"path,key,required"` // The ID of the multipart upload task. UploadId *string `input:"query,uploadId,required"` // The encoding type of the object names in the response. Valid value: url EncodingType *string `input:"query,encoding-type"` // Specifies whether the object that is uploaded by calling the PutObject operation // overwrites an existing object that has the same name. Valid values: true and false ForbidOverwrite *string `input:"header,x-oss-forbid-overwrite"` // Specifies whether to list all parts that are uploaded by using the current upload ID. Valid value: yes CompleteAll *string `input:"header,x-oss-complete-all"` // The container that stores the content of the CompleteMultipartUpload CompleteMultipartUpload *CompleteMultipartUpload `input:"body,CompleteMultipartUpload,xml"` // The access control list (ACL) of the object. Acl ObjectACLType `input:"header,x-oss-object-acl"` // A callback parameter is a Base64-encoded string that contains multiple fields in the JSON format. Callback *string `input:"header,x-oss-callback"` // Configure custom parameters by using the callback-var parameter. CallbackVar *string `input:"header,x-oss-callback-var"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type CompleteMultipartUploadResult ¶
type CompleteMultipartUploadResult struct { // The version ID of the source object. VersionId *string `output:"header,x-oss-version-id"` // The 64-bit CRC value of the object. // This value is calculated based on the ECMA-182 standard. HashCRC64 *string `output:"header,x-oss-hash-crc64ecma"` // The encoding type of the name of the deleted object in the response. // If encoding-type is specified in the request, the object name is encoded in the returned result. EncodingType *string `xml:"EncodingType"` // The URL that is used to access the uploaded object. Location *string `xml:"Location"` // The name of the bucket. Bucket *string `xml:"Bucket"` // The name of the uploaded object. Key *string `xml:"Key"` // The ETag that is generated when an object is created. // ETags are used to identify the content of objects. ETag *string `xml:"ETag"` CallbackResult map[string]any ResultCommon }
type Config ¶
type Config struct { // The region in which the bucket is located. Region *string // The domain names that other services can use to access OSS. Endpoint *string // RetryMaxAttempts specifies the maximum number attempts an API client will call // an operation that fails with a retryable error. RetryMaxAttempts *int // Retryer guides how HTTP requests should be retried in case of recoverable failures. Retryer retry.Retryer // The HTTP client to invoke API calls with. Defaults to client's default HTTP // implementation if nil. HttpClient HTTPClient // The credentials provider to use when signing requests. CredentialsProvider credentials.CredentialsProvider // Allows you to enable the client to use path-style addressing, i.e., https://oss-cn-hangzhou.aliyuncs.com/bucket/key. // By default, the oss client will use virtual hosted addressing i.e., https://bucket.oss-cn-hangzhou.aliyuncs.com/key. UsePathStyle *bool // If the endpoint is s CName, set this flag to true UseCName *bool // Connect timeout ConnectTimeout *time.Duration // read & write timeout ReadWriteTimeout *time.Duration // Skip server certificate verification InsecureSkipVerify *bool // Enable http redirect or not. Default is disable EnabledRedirect *bool // Flag of using proxy host. ProxyHost *string // Read the proxy setting from the environment variables. // HTTP_PROXY, HTTPS_PROXY and NO_PROXY (or the lowercase versions thereof). // HTTPS_PROXY takes precedence over HTTP_PROXY for https requests. ProxyFromEnvironment *bool // Upload bandwidth limit in kBytes/s for all request UploadBandwidthlimit *int64 // Download bandwidth limit in kBytes/s for all request DownloadBandwidthlimit *int64 // Authentication with OSS Signature Version SignatureVersion *SignatureVersionType // The level of the output log LogLevel *int // A interface for the SDK to log messages to. LogPrinter LogPrinter // DisableSSL forces the endpoint to be resolved as HTTP. DisableSSL *bool // Dual-stack endpoints are provided in some regions. // This allows an IPv4 client and an IPv6 client to access a bucket by using the same endpoint. // Set this to `true` to use a dual-stack endpoint for the requests. UseDualStackEndpoint *bool // OSS provides the transfer acceleration feature to accelerate date transfers of data // uploads and downloads across countries and regions. // Set this to `true` to use a accelerate endpoint for the requests. UseAccelerateEndpoint *bool // You can use an internal endpoint to communicate between Alibaba Cloud services located within the same // region over the internal network. You are not charged for the traffic generated over the internal network. // Set this to `true` to use a accelerate endpoint for the requests. UseInternalEndpoint *bool // Check data integrity of uploads via the crc64 by default. // This feature takes effect for PutObject, AppendObject, UploadPart, Uploader.UploadFrom and Uploader.UploadFile // Set this to `true` to disable this feature. DisableUploadCRC64Check *bool // Check data integrity of uploads via the crc64 by default. // This feature only takes effect for Downloader.DownloadFile, GetObjectToFile // Set this to `true` to disable this feature. DisableDownloadCRC64Check *bool // Additional signable headers. AdditionalHeaders []string // The optional user specific identifier appended to the User-Agent header. UserAgent *string }
func LoadDefaultConfig ¶
func LoadDefaultConfig() *Config
func (*Config) WithAdditionalHeaders ¶ added in v1.0.1
func (*Config) WithConnectTimeout ¶
func (*Config) WithCredentialsProvider ¶
func (c *Config) WithCredentialsProvider(provider credentials.CredentialsProvider) *Config
func (*Config) WithDisableDownloadCRC64Check ¶
func (*Config) WithDisableSSL ¶
func (*Config) WithDisableUploadCRC64Check ¶
func (*Config) WithDownloadBandwidthlimit ¶
func (*Config) WithEnabledRedirect ¶
func (*Config) WithEndpoint ¶
func (*Config) WithInsecureSkipVerify ¶
func (*Config) WithLogLevel ¶
func (*Config) WithLogPrinter ¶
func (c *Config) WithLogPrinter(printer LogPrinter) *Config
func (*Config) WithProxyFromEnvironment ¶
func (*Config) WithProxyHost ¶
func (*Config) WithReadWriteTimeout ¶
func (*Config) WithRegion ¶
func (*Config) WithRetryMaxAttempts ¶
func (*Config) WithSignatureVersion ¶
func (c *Config) WithSignatureVersion(value SignatureVersionType) *Config
func (*Config) WithUploadBandwidthlimit ¶
func (*Config) WithUseAccelerateEndpoint ¶
func (*Config) WithUseCName ¶
func (*Config) WithUseDualStackEndpoint ¶
func (*Config) WithUseInternalEndpoint ¶
func (*Config) WithUsePathStyle ¶
func (*Config) WithUserAgent ¶ added in v1.0.1
type Copier ¶
type Copier struct {
// contains filtered or unexported fields
}
func NewCopier ¶
func NewCopier(api CopyAPIClient, optFns ...func(*CopierOptions)) *Copier
NewCopier creates a new Copier instance to copy objects. Pass In additional functional options to customize the copier's behavior.
func (*Copier) Copy ¶
func (c *Copier) Copy(ctx context.Context, request *CopyObjectRequest, optFns ...func(*CopierOptions)) (*CopyResult, error)
type CopierOptions ¶
type CopierOptions struct { PartSize int64 ParallelNum int MultipartCopyThreshold int64 LeavePartsOnError bool DisableShallowCopy bool ClientOptions []func(*Options) // MetaProperties and TagProperties takes effect in Copier.Copy MetadataProperties *HeadObjectResult TagProperties *GetObjectTaggingResult }
type CopyAPIClient ¶
type CopyAPIClient interface { HeadObject(ctx context.Context, request *HeadObjectRequest, optFns ...func(*Options)) (*HeadObjectResult, error) CopyObject(ctx context.Context, request *CopyObjectRequest, optFns ...func(*Options)) (*CopyObjectResult, error) InitiateMultipartUpload(ctx context.Context, request *InitiateMultipartUploadRequest, optFns ...func(*Options)) (*InitiateMultipartUploadResult, error) UploadPartCopy(ctx context.Context, request *UploadPartCopyRequest, optFns ...func(*Options)) (*UploadPartCopyResult, error) CompleteMultipartUpload(ctx context.Context, request *CompleteMultipartUploadRequest, optFns ...func(*Options)) (*CompleteMultipartUploadResult, error) AbortMultipartUpload(ctx context.Context, request *AbortMultipartUploadRequest, optFns ...func(*Options)) (*AbortMultipartUploadResult, error) ListParts(ctx context.Context, request *ListPartsRequest, optFns ...func(*Options)) (*ListPartsResult, error) GetObjectTagging(ctx context.Context, request *GetObjectTaggingRequest, optFns ...func(*Options)) (*GetObjectTaggingResult, error) }
type CopyObjectRequest ¶
type CopyObjectRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // The name of the source bucket. SourceBucket *string `input:"nop,bucket"` // The path of the source object. SourceKey *string `input:"nop,key,required"` // The version ID of the source object. SourceVersionId *string `input:"nop,versionId"` // Specifies whether the object that is uploaded by calling the CopyObject operation // overwrites an existing object that has the same name. Valid values: true and false ForbidOverwrite *string `input:"header,x-oss-forbid-overwrite"` // If the ETag specified in the request matches the ETag value of the object, // the object and 200 OK are returned. Otherwise, 412 Precondition Failed is returned. IfMatch *string `input:"header,x-oss-copy-source-if-match"` // If the ETag specified in the request does not match the ETag value of the object, // the object and 200 OK are returned. Otherwise, 304 Not Modified is returned. IfNoneMatch *string `input:"header,x-oss-copy-source-if-none-match"` // If the time specified in this header is earlier than the object modified time or is invalid, // the object and 200 OK are returned. Otherwise, 304 Not Modified is returned. // The time must be in GMT. Example: Fri, 13 Nov 2015 14:47:53 GMT. IfModifiedSince *string `input:"header,x-oss-copy-source-if-modified-since"` // If the time specified in this header is the same as or later than the object modified time, // the object and 200 OK are returned. Otherwise, 412 Precondition Failed is returned. // The time must be in GMT. Example: Fri, 13 Nov 2015 14:47:53 GMT. IfUnmodifiedSince *string `input:"header,x-oss-copy-source-if-unmodified-since"` // The method that is used to configure the metadata of the destination object. // COPY (default): The metadata of the source object is copied to the destination object. // The configurations of the x-oss-server-side-encryption // header of the source object are not copied to the destination object. // The x-oss-server-side-encryption header in the CopyObject request specifies // the method used to encrypt the destination object. // REPLACE: The metadata specified in the request is used as the metadata of the destination object. MetadataDirective *string `input:"header,x-oss-metadata-directive"` // The encryption method on the server side when an object is created. // Valid values: AES256 and KMS ServerSideEncryption *string `input:"header,x-oss-server-side-encryption"` // The ID of the customer master key (CMK) that is managed by Key Management Service (KMS). // This header is valid only when the x-oss-server-side-encryption header is set to KMS. ServerSideDataEncryption *string `input:"header,x-oss-server-side-data-encryption"` // The ID of the customer master key (CMK) that is managed by Key Management Service (KMS). SSEKMSKeyId *string `input:"header,x-oss-server-side-encryption-key-id"` // The access control list (ACL) of the object. Acl ObjectACLType `input:"header,x-oss-object-acl"` // The storage class of the object. StorageClass StorageClassType `input:"header,x-oss-storage-class"` // The caching behavior of the web page when the object is downloaded. CacheControl *string `input:"header,Cache-Control"` // The method that is used to access the object. ContentDisposition *string `input:"header,Content-Disposition"` // The method that is used to encode the object. ContentEncoding *string `input:"header,Content-Encoding"` // A standard MIME type describing the format of the contents. ContentType *string `input:"header,Content-Type"` // The expiration time of the cache in UTC. Expires *string `input:"header,Expires"` // The metadata of the object that you want to upload. Metadata map[string]string `input:"header,x-oss-meta-,usermeta"` // The tags that are specified for the object by using a key-value pair. // You can specify multiple tags for an object. Example: TagA=A&TagB=B. Tagging *string `input:"header,x-oss-tagging"` // The method that is used to configure tags for the destination object. // Valid values: Copy (default): The tags of the source object are copied to the destination object. // Replace: The tags specified in the request are configured for the destination object. TaggingDirective *string `input:"header,x-oss-tagging-directive"` // Specify the speed limit value. The speed limit value ranges from 245760 to 838860800, with a unit of bit/s. TrafficLimit int64 `input:"header,x-oss-traffic-limit"` // Progress callback function, it works in Copier.Copy only. ProgressFn ProgressFunc // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type CopyObjectResult ¶
type CopyObjectResult struct { // The 64-bit CRC value of the object. // This value is calculated based on the ECMA-182 standard. HashCRC64 *string `output:"header,x-oss-hash-crc64ecma"` // Version of the object. VersionId *string `output:"header,x-oss-version-id"` // The version ID of the source object. SourceVersionId *string `output:"header,x-oss-copy-source-version-id"` // If the requested object is encrypted by using a server-side encryption algorithm based on entropy encoding, // OSS automatically decrypts the object and returns the decrypted object after OSS receives the GetObject request. // The x-oss-server-side-encryption header is included in the response to indicate // the encryption algorithm used to encrypt the object on the server. ServerSideEncryption *string `output:"header,x-oss-server-side-encryption"` //The ID of the customer master key (CMK) that is managed by Key Management Service (KMS). ServerSideDataEncryption *string `output:"header,x-oss-server-side-data-encryption"` // The ID of the customer master key (CMK) that is managed by Key Management Service (KMS). SSEKMSKeyId *string `output:"header,x-oss-server-side-encryption-key-id"` // The time when the returned objects were last modified. LastModified *time.Time `xml:"LastModified"` // The entity tag (ETag). An ETag is created when an object is created to identify the content of the object. ETag *string `xml:"ETag"` ResultCommon }
type CopyResult ¶
type CopyResult struct { UploadId *string ETag *string VersionId *string HashCRC64 *string ResultCommon }
type CreateAccessPointConfiguration ¶ added in v1.1.2
type CreateAccessPointConfiguration struct { // The name of the access point. The name of the access point must meet the following naming rules:* The name must be unique in a region of your Alibaba Cloud account.* The name cannot end with -ossalias.* The name can contain only lowercase letters, digits, and hyphens (-). It cannot start or end with a hyphen (-).* The name must be 3 to 19 characters in length. AccessPointName *string `xml:"AccessPointName"` // The network origin of the access point. NetworkOrigin *string `xml:"NetworkOrigin"` // The container that stores the information about the VPC. VpcConfiguration *AccessPointVpcConfiguration `xml:"VpcConfiguration"` }
type CreateAccessPointRequest ¶ added in v1.1.2
type CreateAccessPointRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The container of the request body. CreateAccessPointConfiguration *CreateAccessPointConfiguration `input:"body,CreateAccessPointConfiguration,xml,required"` RequestCommon }
type CreateAccessPointResult ¶ added in v1.1.2
type CreateAccessPointResult struct { // The Alibaba Cloud Resource Name (ARN) of the access point. AccessPointArn *string `xml:"AccessPointArn"` // The alias of the access point. Alias *string `xml:"Alias"` ResultCommon }
type CreateBucketConfiguration ¶
type CreateBucketConfiguration struct { XMLName xml.Name `xml:"CreateBucketConfiguration"` // The storage class of the bucket. StorageClass StorageClassType `xml:"StorageClass,omitempty"` // The redundancy type of the bucket. DataRedundancyType DataRedundancyType `xml:"DataRedundancyType,omitempty"` }
type CreateCnameTokenRequest ¶ added in v1.1.1
type CreateCnameTokenRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The request body schema. BucketCnameConfiguration *BucketCnameConfiguration `input:"body,BucketCnameConfiguration,xml,required"` RequestCommon }
type CreateCnameTokenResult ¶ added in v1.1.1
type CreateCnameTokenResult struct { // The container in which the CNAME token is stored. CnameToken *CnameToken `output:"body,CnameToken,xml"` ResultCommon }
type CreateSelectObjectMetaRequest ¶
type CreateSelectObjectMetaRequest struct { // The name of the bucket. Bucket *string `input:"host,uploadId,required"` // The name of the object. Key *string `input:"path,key,required"` MetaRequest any `input:"nop,meta-request,required"` RequestCommon }
type CsvMetaRequest ¶
type CsvMetaRequest struct { InputSerialization *InputSerialization `xml:"InputSerialization"` OverwriteIfExists *bool `xml:"OverwriteIfExists"` }
type DataRedundancyType ¶
type DataRedundancyType string
DataRedundancyType The redundancy type of the bucket
const ( // DataRedundancyLRS Locally redundant storage (LRS) stores copies of each object across different devices in the same zone. // This ensures data reliability and availability even if two storage devices are damaged at the same time. DataRedundancyLRS DataRedundancyType = "LRS" // DataRedundancyZRS Zone-redundant storage (ZRS) uses the multi-zone mechanism to distribute user data across // multiple zones in the same region. If one zone becomes unavailable, you can continue to access the data // that is stored in other zones. DataRedundancyZRS DataRedundancyType = "ZRS" )
Enum values for BucketACLType
type DeleteAccessPointPolicyRequest ¶ added in v1.1.2
type DeleteAccessPointPolicyRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the access point. AccessPointName *string `input:"header,x-oss-access-point-name,required"` RequestCommon }
type DeleteAccessPointPolicyResult ¶ added in v1.1.2
type DeleteAccessPointPolicyResult struct {
ResultCommon
}
type DeleteAccessPointPublicAccessBlockRequest ¶ added in v1.1.2
type DeleteAccessPointPublicAccessBlockRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the access point. AccessPointName *string `input:"query,x-oss-access-point-name,required"` RequestCommon }
type DeleteAccessPointPublicAccessBlockResult ¶ added in v1.1.2
type DeleteAccessPointPublicAccessBlockResult struct {
ResultCommon
}
type DeleteAccessPointRequest ¶ added in v1.1.2
type DeleteAccessPointRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the access point. AccessPointName *string `input:"header,x-oss-access-point-name,required"` RequestCommon }
type DeleteAccessPointResult ¶ added in v1.1.2
type DeleteAccessPointResult struct {
ResultCommon
}
type DeleteBucketCorsRequest ¶ added in v1.1.0
type DeleteBucketCorsRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type DeleteBucketCorsResult ¶ added in v1.1.0
type DeleteBucketCorsResult struct {
ResultCommon
}
type DeleteBucketEncryptionRequest ¶ added in v1.1.0
type DeleteBucketEncryptionRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type DeleteBucketEncryptionResult ¶ added in v1.1.0
type DeleteBucketEncryptionResult struct {
ResultCommon
}
type DeleteBucketInventoryRequest ¶ added in v1.1.0
type DeleteBucketInventoryRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the inventory that you want to delete. InventoryId *string `input:"query,inventoryId,required"` RequestCommon }
type DeleteBucketInventoryResult ¶ added in v1.1.0
type DeleteBucketInventoryResult struct {
ResultCommon
}
type DeleteBucketLifecycleRequest ¶ added in v1.1.0
type DeleteBucketLifecycleRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type DeleteBucketLifecycleResult ¶ added in v1.1.0
type DeleteBucketLifecycleResult struct {
ResultCommon
}
type DeleteBucketLoggingRequest ¶ added in v1.1.0
type DeleteBucketLoggingRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type DeleteBucketLoggingResult ¶ added in v1.1.0
type DeleteBucketLoggingResult struct {
ResultCommon
}
type DeleteBucketPolicyRequest ¶ added in v1.1.0
type DeleteBucketPolicyRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type DeleteBucketPolicyResult ¶ added in v1.1.0
type DeleteBucketPolicyResult struct {
ResultCommon
}
type DeleteBucketPublicAccessBlockRequest ¶ added in v1.1.0
type DeleteBucketPublicAccessBlockRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type DeleteBucketPublicAccessBlockResult ¶ added in v1.1.0
type DeleteBucketPublicAccessBlockResult struct {
ResultCommon
}
type DeleteBucketReplicationRequest ¶ added in v1.1.0
type DeleteBucketReplicationRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The container of the request body. ReplicationRules *ReplicationRules `input:"body,ReplicationRules,xml,required"` RequestCommon }
type DeleteBucketReplicationResult ¶ added in v1.1.0
type DeleteBucketReplicationResult struct {
ResultCommon
}
type DeleteBucketRequest ¶
type DeleteBucketRequest struct { // The name of the bucket to delete. Bucket *string `input:"host,bucket,required"` RequestCommon }
type DeleteBucketResult ¶
type DeleteBucketResult struct {
ResultCommon
}
type DeleteBucketTagsRequest ¶ added in v1.1.0
type DeleteBucketTagsRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` Tagging *string `input:"query,tagging"` RequestCommon }
type DeleteBucketTagsResult ¶ added in v1.1.0
type DeleteBucketTagsResult struct {
ResultCommon
}
type DeleteBucketWebsiteRequest ¶ added in v1.1.0
type DeleteBucketWebsiteRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type DeleteBucketWebsiteResult ¶ added in v1.1.0
type DeleteBucketWebsiteResult struct {
ResultCommon
}
type DeleteCnameRequest ¶ added in v1.1.1
type DeleteCnameRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The request body schema. BucketCnameConfiguration *BucketCnameConfiguration `input:"body,BucketCnameConfiguration,xml,required"` RequestCommon }
type DeleteCnameResult ¶ added in v1.1.1
type DeleteCnameResult struct {
ResultCommon
}
type DeleteMultipleObjectsRequest ¶
type DeleteMultipleObjectsRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The encoding type of the object names in the response. Valid value: url EncodingType *string `input:"query,encoding-type"` // The size of the data in the HTTP message body. Unit: bytes. ContentLength int64 `input:"header,Content-Length"` // The container that stores information about you want to delete objects. Objects []DeleteObject `input:"nop,objects,required"` // Specifies whether to enable the Quiet return mode. // The DeleteMultipleObjects operation provides the following return modes: Valid value: true,false Quiet bool // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type DeleteMultipleObjectsResult ¶
type DeleteMultipleObjectsResult struct { // The container that stores information about the deleted objects. DeletedObjects []DeletedInfo `xml:"Deleted"` // The encoding type of the name of the deleted object in the response. // If encoding-type is specified in the request, the object name is encoded in the returned result. EncodingType *string `xml:"EncodingType"` ResultCommon }
type DeleteObject ¶
type DeleteObjectRequest ¶
type DeleteObjectRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // The version ID of the source object. VersionId *string `input:"query,versionId"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type DeleteObjectResult ¶
type DeleteObjectResult struct { // Version of the object. VersionId *string `output:"header,x-oss-version-id"` // Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. DeleteMarker bool `output:"header,x-oss-delete-marker"` ResultCommon }
type DeleteObjectTaggingRequest ¶
type DeleteObjectTaggingRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // Version of the object. VersionId *string `input:"query,versionId"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type DeleteObjectTaggingResult ¶
type DeleteObjectTaggingResult struct { // Version of the object. VersionId *string `output:"header,x-oss-version-id"` ResultCommon }
type DeletePublicAccessBlockRequest ¶ added in v1.1.0
type DeletePublicAccessBlockRequest struct {
RequestCommon
}
type DeletePublicAccessBlockResult ¶ added in v1.1.0
type DeletePublicAccessBlockResult struct {
ResultCommon
}
type DeleteStyleRequest ¶ added in v1.1.0
type DeleteStyleRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the image style. StyleName *string `input:"query,styleName,required"` RequestCommon }
type DeleteStyleResult ¶ added in v1.1.0
type DeleteStyleResult struct {
ResultCommon
}
type DeleteUserDefinedLogFieldsConfigRequest ¶ added in v1.1.0
type DeleteUserDefinedLogFieldsConfigRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type DeleteUserDefinedLogFieldsConfigResult ¶ added in v1.1.0
type DeleteUserDefinedLogFieldsConfigResult struct {
ResultCommon
}
type DeletedInfo ¶
type DeletedInfo struct { // The name of the deleted object. Key *string `xml:"Key"` // The version ID of the object that you deleted. VersionId *string `xml:"VersionId"` // Indicates whether the deleted version is a delete marker. DeleteMarker bool `xml:"DeleteMarker"` // The version ID of the delete marker. DeleteMarkerVersionId *string `xml:"DeleteMarkerVersionId"` }
type DeserializationError ¶
func (*DeserializationError) Error ¶
func (e *DeserializationError) Error() string
func (*DeserializationError) Unwrap ¶
func (e *DeserializationError) Unwrap() error
type DiscardReadCloser ¶
type DiscardReadCloser struct { RC io.ReadCloser Discard int }
func (*DiscardReadCloser) Close ¶
func (drc *DiscardReadCloser) Close() error
type DoMetaQueryRequest ¶ added in v1.1.2
type DoMetaQueryRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The request body schema. MetaQuery *MetaQuery `input:"body,MetaQuery,xml,required"` RequestCommon }
type DoMetaQueryResult ¶ added in v1.1.2
type DoMetaQueryResult struct { // The token that is used for the next query when the total number of objects exceeds the value of MaxResults.The value of NextToken is used to return the unreturned results in the next query.This parameter has a value only when not all objects are returned. NextToken *string `xml:"NextToken"` // The list of file information. Files []MetaQueryFile `xml:"Files>File"` // The list of file information. Aggregations []MetaQueryAggregation `xml:"Aggregations>Aggregation"` ResultCommon }
type DownloadAPIClient ¶
type DownloadAPIClient interface { HeadObject(ctx context.Context, request *HeadObjectRequest, optFns ...func(*Options)) (*HeadObjectResult, error) GetObject(ctx context.Context, request *GetObjectRequest, optFns ...func(*Options)) (*GetObjectResult, error) }
type DownloadError ¶
func (*DownloadError) Error ¶
func (m *DownloadError) Error() string
func (*DownloadError) Unwrap ¶
func (m *DownloadError) Unwrap() error
type DownloadResult ¶
type DownloadResult struct {
Written int64
}
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
func NewDownloader ¶
func NewDownloader(c DownloadAPIClient, optFns ...func(*DownloaderOptions)) *Downloader
NewDownloader creates a new Downloader instance to downloads objects. Pass in additional functional options to customize the downloader behavior.
func (*Downloader) DownloadFile ¶
func (d *Downloader) DownloadFile(ctx context.Context, request *GetObjectRequest, filePath string, optFns ...func(*DownloaderOptions)) (result *DownloadResult, err error)
type DownloaderOptions ¶
type EncryptionClient ¶
type EncryptionClient struct {
// contains filtered or unexported fields
}
func NewEncryptionClient ¶
func NewEncryptionClient(c *Client, masterCipher crypto.MasterCipher, optFns ...func(*EncryptionClientOptions)) (*EncryptionClient, error)
func (*EncryptionClient) AbortMultipartUpload ¶
func (e *EncryptionClient) AbortMultipartUpload(ctx context.Context, request *AbortMultipartUploadRequest, optFns ...func(*Options)) (*AbortMultipartUploadResult, error)
AbortMultipartUpload Cancels a multipart upload task and deletes the parts uploaded in the task.
func (*EncryptionClient) CompleteMultipartUpload ¶
func (e *EncryptionClient) CompleteMultipartUpload(ctx context.Context, request *CompleteMultipartUploadRequest, optFns ...func(*Options)) (*CompleteMultipartUploadResult, error)
CompleteMultipartUpload Completes the multipart upload task of an object after all parts of the object are uploaded.
func (*EncryptionClient) GetObject ¶
func (e *EncryptionClient) GetObject(ctx context.Context, request *GetObjectRequest, optFns ...func(*Options)) (*GetObjectResult, error)
GetObject Downloads a object.
func (*EncryptionClient) GetObjectMeta ¶
func (e *EncryptionClient) GetObjectMeta(ctx context.Context, request *GetObjectMetaRequest, optFns ...func(*Options)) (*GetObjectMetaResult, error)
GetObjectMeta Queries the metadata of an object, including ETag, Size, and LastModified. The content of the object is not returned.
func (*EncryptionClient) HeadObject ¶
func (e *EncryptionClient) HeadObject(ctx context.Context, request *HeadObjectRequest, optFns ...func(*Options)) (*HeadObjectResult, error)
HeadObject Queries information about all objects in a bucket.
func (*EncryptionClient) InitiateMultipartUpload ¶
func (e *EncryptionClient) InitiateMultipartUpload(ctx context.Context, request *InitiateMultipartUploadRequest, optFns ...func(*Options)) (*InitiateMultipartUploadResult, error)
InitiateMultipartUpload Initiates a multipart upload task before you can upload data in parts to Object Storage Service (OSS).
func (*EncryptionClient) ListParts ¶
func (e *EncryptionClient) ListParts(ctx context.Context, request *ListPartsRequest, optFns ...func(*Options)) (*ListPartsResult, error)
ListParts Lists all parts that are uploaded by using a specified upload ID.
func (*EncryptionClient) NewDownloader ¶
func (c *EncryptionClient) NewDownloader(optFns ...func(*DownloaderOptions)) *Downloader
NewDownloader creates a new Downloader instance to download objects.
func (*EncryptionClient) NewUploader ¶
func (c *EncryptionClient) NewUploader(optFns ...func(*UploaderOptions)) *Uploader
NewUploader creates a new Uploader instance to upload objects.
func (*EncryptionClient) OpenFile ¶
func (c *EncryptionClient) OpenFile(ctx context.Context, bucket string, key string, optFns ...func(*OpenOptions)) (*ReadOnlyFile, error)
OpenFile opens the named file for reading.
func (*EncryptionClient) PutObject ¶
func (e *EncryptionClient) PutObject(ctx context.Context, request *PutObjectRequest, optFns ...func(*Options)) (*PutObjectResult, error)
PutObject Uploads a object.
func (*EncryptionClient) Unwrap ¶
func (e *EncryptionClient) Unwrap() *Client
func (*EncryptionClient) UploadPart ¶
func (e *EncryptionClient) UploadPart(ctx context.Context, request *UploadPartRequest, optFns ...func(*Options)) (*UploadPartResult, error)
UploadPart Call the UploadPart interface to upload data in blocks (parts) based on the specified Object name and uploadId.
type EncryptionClientOptions ¶
type EncryptionClientOptions struct {
MasterCiphers []crypto.MasterCipher
}
type EncryptionMultiPartContext ¶
type EncryptionMultiPartContext struct { ContentCipher crypto.ContentCipher DataSize int64 PartSize int64 }
EncryptionMultiPartContext save encryption or decryption information
func (EncryptionMultiPartContext) Valid ¶
func (ec EncryptionMultiPartContext) Valid() bool
Valid judge PartCryptoContext is valid or not
type EndpointType ¶
type EndpointType int
const ( // Access OSS over the public network, oss-[region].aliyuncs.com EndpointPublic EndpointType = iota // Access OSS over the internal network, oss-[region]-internal.aliyuncs.com EndpointInternal // Access OSS over the global acceleration endpoint, oss-accelerate.aliyuncs.com EndpointAccelerate // Access OSS over the acceleration endpoint outside the Chinese mainland, oss-accelerate-overseas.aliyuncs.com EndpointAccelerateOverseas // Access OSS over the dual stack endpoint that support both IPv4 and IPv6, [region].oss.aliyuncs.com EndpointDualStack )
type ErrorDocument ¶ added in v1.1.0
type ExtendBucketWormRequest ¶ added in v1.1.0
type ExtendBucketWormRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The ID of the retention policy.> If the ID of the retention policy that specifies the number of days for which objects can be retained does not exist, the HTTP status code 404 is returned. WormId *string `input:"query,wormId,required"` // The container of the request body. ExtendWormConfiguration *ExtendWormConfiguration `input:"body,ExtendWormConfiguration,xml,required"` RequestCommon }
type ExtendBucketWormResult ¶ added in v1.1.0
type ExtendBucketWormResult struct {
ResultCommon
}
type ExtendWormConfiguration ¶ added in v1.1.0
type ExtendWormConfiguration struct { // The number of days for which objects can be retained. RetentionPeriodInDays *int32 `xml:"RetentionPeriodInDays"` }
type FeatureFlagsType ¶
type FeatureFlagsType int
const ( // FeatureCorrectClockSkew If the client time is different from server time by more than about 15 minutes, // the requests your application makes will be signed with the incorrect time, and the server will reject them. // The feature to help to identify this case, and SDK will correct for clock skew. FeatureCorrectClockSkew FeatureFlagsType = 1 << iota FeatureEnableMD5 // FeatureAutoDetectMimeType Content-Type is automatically added based on the object name if not specified. // This feature takes effect for PutObject, AppendObject and InitiateMultipartUpload FeatureAutoDetectMimeType // FeatureEnableCRC64CheckUpload check data integrity of uploads via the crc64. // This feature takes effect for PutObject, AppendObject, UploadPart, Uploader.UploadFrom and Uploader.UploadFile FeatureEnableCRC64CheckUpload // FeatureEnableCRC64CheckDownload check data integrity of downloads via the crc64. // This feature takes effect for Downloader.DownloadFile FeatureEnableCRC64CheckDownload FeatureFlagsDefault = FeatureCorrectClockSkew + FeatureAutoDetectMimeType + FeatureEnableCRC64CheckUpload + FeatureEnableCRC64CheckDownload )
type GetAccessPointPolicyRequest ¶ added in v1.1.2
type GetAccessPointPolicyRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the access point. AccessPointName *string `input:"header,x-oss-access-point-name,required"` RequestCommon }
type GetAccessPointPolicyResult ¶ added in v1.1.2
type GetAccessPointPolicyResult struct { // The configurations of the access point policy. Body string ResultCommon }
type GetAccessPointPublicAccessBlockRequest ¶ added in v1.1.2
type GetAccessPointPublicAccessBlockRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the access point. AccessPointName *string `input:"query,x-oss-access-point-name,required"` RequestCommon }
type GetAccessPointPublicAccessBlockResult ¶ added in v1.1.2
type GetAccessPointPublicAccessBlockResult struct { // The container in which the Block Public Access configurations are stored. PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `output:"body,PublicAccessBlockConfiguration,xml"` ResultCommon }
type GetAccessPointRequest ¶ added in v1.1.2
type GetAccessPointRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the access point. AccessPointName *string `input:"header,x-oss-access-point-name,required"` RequestCommon }
type GetAccessPointResult ¶ added in v1.1.2
type GetAccessPointResult struct { // The ARN of the access point. AccessPointArn *string `xml:"AccessPointArn"` // The alias of the access point. Alias *string `xml:"Alias"` // The public endpoint of the access point. PublicEndpoint *string `xml:"Endpoints>PublicEndpoint"` // The internal endpoint of the access point. InternalEndpoint *string `xml:"Endpoints>InternalEndpoint"` // The time when the access point was created. CreationDate *string `xml:"CreationDate"` // The name of the access point. AccessPointName *string `xml:"AccessPointName"` // The name of the bucket for which the access point is configured. Bucket *string `xml:"Bucket"` // The ID of the Alibaba Cloud account for which the access point is configured. AccountId *string `xml:"AccountId"` // The network origin of the access point. Valid values: vpc and internet. vpc: You can only use the specified VPC ID to access the access point. internet: You can use public endpoints and internal endpoints to access the access point. NetworkOrigin *string `xml:"NetworkOrigin"` // The container that stores the information about the VPC. VpcConfiguration *AccessPointVpcConfiguration `xml:"VpcConfiguration"` // The status of the access point. AccessPointStatus *string `xml:"Status"` // The container that stores the Block Public Access configurations. PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `xml:"PublicAccessBlockConfiguration"` ResultCommon }
type GetBucketAccessMonitorRequest ¶ added in v1.1.0
type GetBucketAccessMonitorRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketAccessMonitorResult ¶ added in v1.1.0
type GetBucketAccessMonitorResult struct { // The container that stores access monitor configuration. AccessMonitorConfiguration *AccessMonitorConfiguration `output:"body,AccessMonitorConfiguration,xml"` ResultCommon }
type GetBucketAclRequest ¶
type GetBucketAclRequest struct { // The name of the bucket containing the objects Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketAclResult ¶
type GetBucketAclResult struct { // The container that stores the access control list (ACL) information about the bucket. ACL *string `xml:"AccessControlList>Grant"` // The container that stores information about the bucket owner. Owner *Owner `xml:"Owner"` ResultCommon }
type GetBucketArchiveDirectReadRequest ¶ added in v1.1.0
type GetBucketArchiveDirectReadRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketArchiveDirectReadResult ¶ added in v1.1.0
type GetBucketArchiveDirectReadResult struct { // The container that stores the configurations for real-time access of Archive objects. ArchiveDirectReadConfiguration *ArchiveDirectReadConfiguration `output:"body,ArchiveDirectReadConfiguration,xml"` ResultCommon }
type GetBucketCorsRequest ¶ added in v1.1.0
type GetBucketCorsRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketCorsResult ¶ added in v1.1.0
type GetBucketCorsResult struct { // The container that stores CORS configuration. CORSConfiguration *CORSConfiguration `output:"body,CORSConfiguration,xml"` ResultCommon }
type GetBucketEncryptionRequest ¶ added in v1.1.0
type GetBucketEncryptionRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketEncryptionResult ¶ added in v1.1.0
type GetBucketEncryptionResult struct { // The container that stores server-side encryption rules. ServerSideEncryptionRule *ServerSideEncryptionRule `output:"body,ServerSideEncryptionRule,xml"` ResultCommon }
type GetBucketHttpsConfigRequest ¶ added in v1.1.0
type GetBucketHttpsConfigRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketHttpsConfigResult ¶ added in v1.1.0
type GetBucketHttpsConfigResult struct { // The container that stores HTTPS configurations. HttpsConfiguration *HttpsConfiguration `output:"body,HttpsConfiguration,xml"` ResultCommon }
type GetBucketInfoRequest ¶
type GetBucketInfoRequest struct { // The name of the bucket containing the objects Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketInfoResult ¶
type GetBucketInfoResult struct { // The container that stores the bucket information. BucketInfo BucketInfo `xml:"Bucket"` ResultCommon }
type GetBucketInventoryRequest ¶ added in v1.1.0
type GetBucketInventoryRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the inventory to be queried. InventoryId *string `input:"query,inventoryId,required"` RequestCommon }
type GetBucketInventoryResult ¶ added in v1.1.0
type GetBucketInventoryResult struct { // The inventory task configured for a bucket. InventoryConfiguration *InventoryConfiguration `output:"body,InventoryConfiguration,xml"` ResultCommon }
type GetBucketLifecycleRequest ¶ added in v1.1.0
type GetBucketLifecycleRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketLifecycleResult ¶ added in v1.1.0
type GetBucketLifecycleResult struct { // The container that stores the lifecycle rules configured for the bucket. LifecycleConfiguration *LifecycleConfiguration `output:"body,LifecycleConfiguration,xml"` ResultCommon }
type GetBucketLocationRequest ¶
type GetBucketLocationRequest struct { // The name of the bucket containing the objects Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketLocationResult ¶
type GetBucketLocationResult struct { // The region in which the bucket is located. LocationConstraint *string `xml:",chardata"` ResultCommon }
type GetBucketLoggingRequest ¶ added in v1.1.0
type GetBucketLoggingRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketLoggingResult ¶ added in v1.1.0
type GetBucketLoggingResult struct { // Indicates the container used to store access logging configuration of a bucket. BucketLoggingStatus *BucketLoggingStatus `output:"body,BucketLoggingStatus,xml"` ResultCommon }
type GetBucketPolicyRequest ¶ added in v1.1.0
type GetBucketPolicyRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketPolicyResult ¶ added in v1.1.0
type GetBucketPolicyResult struct { // The configurations of the bucket policy. Body string ResultCommon }
type GetBucketPolicyStatusRequest ¶ added in v1.1.0
type GetBucketPolicyStatusRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketPolicyStatusResult ¶ added in v1.1.0
type GetBucketPolicyStatusResult struct { // The container that stores public access information. PolicyStatus *PolicyStatus `output:"body,PolicyStatus,xml"` ResultCommon }
type GetBucketPublicAccessBlockRequest ¶ added in v1.1.0
type GetBucketPublicAccessBlockRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketPublicAccessBlockResult ¶ added in v1.1.0
type GetBucketPublicAccessBlockResult struct { // The container in which the Block Public Access configurations are stored. PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `output:"body,PublicAccessBlockConfiguration,xml"` ResultCommon }
type GetBucketRefererRequest ¶ added in v1.1.0
type GetBucketRefererRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketRefererResult ¶ added in v1.1.0
type GetBucketRefererResult struct { // The container that stores the hotlink protection configurations. RefererConfiguration *RefererConfiguration `output:"body,RefererConfiguration,xml"` ResultCommon }
type GetBucketReplicationLocationRequest ¶ added in v1.1.0
type GetBucketReplicationLocationRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketReplicationLocationResult ¶ added in v1.1.0
type GetBucketReplicationLocationResult struct { // The container that stores the region in which the destination bucket can be located. ReplicationLocation *ReplicationLocation `output:"body,ReplicationLocation,xml"` ResultCommon }
type GetBucketReplicationProgressRequest ¶ added in v1.1.0
type GetBucketReplicationProgressRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The ID of the data replication rule. You can call the GetBucketReplication operation to query the ID. RuleId *string `input:"query,rule-id,required"` RequestCommon }
type GetBucketReplicationProgressResult ¶ added in v1.1.0
type GetBucketReplicationProgressResult struct { // The container that is used to store the progress of data replication tasks. ReplicationProgress *ReplicationProgress `output:"body,ReplicationProgress,xml"` ResultCommon }
type GetBucketReplicationRequest ¶ added in v1.1.0
type GetBucketReplicationRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketReplicationResult ¶ added in v1.1.0
type GetBucketReplicationResult struct { // The container that stores data replication configurations. ReplicationConfiguration *ReplicationConfiguration `output:"body,ReplicationConfiguration,xml"` ResultCommon }
type GetBucketRequestPaymentRequest ¶
type GetBucketRequestPaymentRequest struct { // The name of the bucket containing the objects Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketRequestPaymentResult ¶
type GetBucketRequestPaymentResult struct { // Indicates who pays the download and request fees. Payer *string `xml:"Payer"` ResultCommon }
type GetBucketResourceGroupRequest ¶ added in v1.1.0
type GetBucketResourceGroupRequest struct { // The name of the bucket that you want to query. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketResourceGroupResult ¶ added in v1.1.0
type GetBucketResourceGroupResult struct { // The container that stores the ID of the resource group. BucketResourceGroupConfiguration *BucketResourceGroupConfiguration `output:"body,BucketResourceGroupConfiguration,xml"` ResultCommon }
type GetBucketStatRequest ¶
type GetBucketStatRequest struct { // The name of the bucket containing the objects Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketStatResult ¶
type GetBucketStatResult struct { // The storage capacity of the bucket. Unit: bytes. Storage int64 `xml:"Storage"` // The total number of objects that are stored in the bucket. ObjectCount int64 `xml:"ObjectCount"` // The number of multipart upload tasks that have been initiated but are not completed or canceled. MultipartUploadCount int64 `xml:"MultipartUploadCount"` // The number of LiveChannels in the bucket. LiveChannelCount int64 `xml:"LiveChannelCount"` // The time when the obtained information is last modified. The value of this element is a UNIX timestamp. Unit: seconds. LastModifiedTime int64 `xml:"LastModifiedTime"` // The storage usage of Standard objects in the bucket. Unit: bytes. StandardStorage int64 `xml:"StandardStorage"` // The number of Standard objects in the bucket. StandardObjectCount int64 `xml:"StandardObjectCount"` // The billed storage usage of Infrequent Access (IA) objects in the bucket. Unit: bytes. InfrequentAccessStorage int64 `xml:"InfrequentAccessStorage"` // The actual storage usage of IA objects in the bucket. Unit: bytes. InfrequentAccessRealStorage int64 `xml:"InfrequentAccessRealStorage"` // The number of IA objects in the bucket. InfrequentAccessObjectCount int64 `xml:"InfrequentAccessObjectCount"` // The billed storage usage of Archive objects in the bucket. Unit: bytes. ArchiveStorage int64 `xml:"ArchiveStorage"` // The actual storage usage of Archive objects in the bucket. Unit: bytes. ArchiveRealStorage int64 `xml:"ArchiveRealStorage"` // The number of Archive objects in the bucket. ArchiveObjectCount int64 `xml:"ArchiveObjectCount"` // The billed storage usage of Cold Archive objects in the bucket. Unit: bytes. ColdArchiveStorage int64 `xml:"ColdArchiveStorage"` // The actual storage usage of Cold Archive objects in the bucket. Unit: bytes. ColdArchiveRealStorage int64 `xml:"ColdArchiveRealStorage"` // The number of Cold Archive objects in the bucket. ColdArchiveObjectCount int64 `xml:"ColdArchiveObjectCount"` // The number of Deep Cold Archive objects in the bucket. DeepColdArchiveObjectCount int64 `xml:"DeepColdArchiveObjectCount"` // The billed storage usage of Deep Cold Archive objects in the bucket. Unit: bytes. DeepColdArchiveStorage int64 `xml:"DeepColdArchiveStorage"` // The actual storage usage of Deep Cold Archive objects in the bucket. Unit: bytes. DeepColdArchiveRealStorage int64 `xml:"DeepColdArchiveRealStorage"` // The number of multipart parts in the bucket. MultipartPartCount int64 `xml:"MultipartPartCount"` // The number of delete marker in the bucket. DeleteMarkerCount int64 `xml:"DeleteMarkerCount"` ResultCommon }
type GetBucketTagsRequest ¶ added in v1.1.0
type GetBucketTagsRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketTagsResult ¶ added in v1.1.0
type GetBucketTagsResult struct { // The container that stores the returned tags of the bucket. If no tags are configured for the bucket, an XML message body is returned in which the Tagging element is empty. Tagging *Tagging `output:"body,Tagging,xml"` ResultCommon }
type GetBucketTransferAccelerationRequest ¶ added in v1.1.0
type GetBucketTransferAccelerationRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketTransferAccelerationResult ¶ added in v1.1.0
type GetBucketTransferAccelerationResult struct { // The container that stores the transfer acceleration configurations. TransferAccelerationConfiguration *TransferAccelerationConfiguration `output:"body,TransferAccelerationConfiguration,xml"` ResultCommon }
type GetBucketVersioningRequest ¶
type GetBucketVersioningRequest struct { // The name of the bucket containing the objects Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketVersioningResult ¶
type GetBucketVersioningResult struct { // The versioning state of the bucket. Valid values: Enabled,Suspended VersionStatus *string `xml:"Status"` ResultCommon }
type GetBucketWebsiteRequest ¶ added in v1.1.0
type GetBucketWebsiteRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketWebsiteResult ¶ added in v1.1.0
type GetBucketWebsiteResult struct { // The containers of the website configuration. WebsiteConfiguration *WebsiteConfiguration `output:"body,WebsiteConfiguration,xml"` ResultCommon }
type GetBucketWormRequest ¶ added in v1.1.0
type GetBucketWormRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetBucketWormResult ¶ added in v1.1.0
type GetBucketWormResult struct { // The container that stores the information about retention policies of the bucket. WormConfiguration *WormConfiguration `output:"body,WormConfiguration,xml"` ResultCommon }
type GetCnameTokenRequest ¶ added in v1.1.1
type GetCnameTokenRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the CNAME record that is mapped to the bucket. Cname *string `input:"query,cname,required"` RequestCommon }
type GetCnameTokenResult ¶ added in v1.1.1
type GetCnameTokenResult struct { // The container in which the CNAME token is stored. CnameToken *CnameToken `output:"body,CnameToken,xml"` ResultCommon }
type GetMetaQueryStatusRequest ¶ added in v1.1.2
type GetMetaQueryStatusRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetMetaQueryStatusResult ¶ added in v1.1.2
type GetMetaQueryStatusResult struct { // The container that stores the metadata information. MetaQueryStatus *MetaQueryStatus `output:"body,MetaQueryStatus,xml"` ResultCommon }
type GetObjectAclRequest ¶
type GetObjectAclRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // The version ID of the source object. VersionId *string `input:"query,versionId"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type GetObjectAclResult ¶
type GetObjectAclResult struct { // The ACL of the object. Default value: default. ACL *string `xml:"AccessControlList>Grant"` // The container that stores information about the object owner. Owner *Owner `xml:"Owner"` // Version of the object. VersionId *string `output:"header,x-oss-version-id"` ResultCommon }
type GetObjectMetaRequest ¶
type GetObjectMetaRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // The version ID of the source object. VersionId *string `input:"query,versionId"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type GetObjectMetaResult ¶
type GetObjectMetaResult struct { // Size of the body in bytes. -1 indicates that the Content-Length dose not exist. ContentLength int64 `output:"header,Content-Length"` // The entity tag (ETag). An ETag is created when an object is created to identify the content of the object. ETag *string `output:"header,ETag"` // The time when the returned objects were last modified. LastModified *time.Time `output:"header,Last-Modified,time"` // The time when the object was last accessed. LastAccessTime *time.Time `output:"header,x-oss-last-access-time,time"` // Version of the object. VersionId *string `output:"header,x-oss-version-id"` // The 64-bit CRC value of the object. // This value is calculated based on the ECMA-182 standard. HashCRC64 *string `output:"header,x-oss-hash-crc64ecma"` ResultCommon }
type GetObjectRequest ¶
type GetObjectRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // If the ETag specified in the request matches the ETag value of the object, // the object and 200 OK are returned. Otherwise, 412 Precondition Failed is returned. IfMatch *string `input:"header,If-Match"` // If the ETag specified in the request does not match the ETag value of the object, // the object and 200 OK are returned. Otherwise, 304 Not Modified is returned. IfNoneMatch *string `input:"header,If-None-Match"` // If the time specified in this header is earlier than the object modified time or is invalid, // the object and 200 OK are returned. Otherwise, 304 Not Modified is returned. // The time must be in GMT. Example: Fri, 13 Nov 2015 14:47:53 GMT. IfModifiedSince *string `input:"header,If-Modified-Since"` // If the time specified in this header is the same as or later than the object modified time, // the object and 200 OK are returned. Otherwise, 412 Precondition Failed is returned. // The time must be in GMT. Example: Fri, 13 Nov 2015 14:47:53 GMT. IfUnmodifiedSince *string `input:"header,If-Unmodified-Since"` // The content range of the object to be returned. // If the value of Range is valid, the total size of the object and the content range are returned. // For example, Content-Range: bytes 0~9/44 indicates that the total size of the object is 44 bytes, // and the range of data returned is the first 10 bytes. // However, if the value of Range is invalid, the entire object is returned, // and the response does not include the Content-Range parameter. Range *string `input:"header,Range"` // Specify standard behaviors to download data by range // If the value is "standard", the download behavior is modified when the specified range is not within the valid range. // For an object whose size is 1,000 bytes: // 1) If you set Range: bytes to 500-2000, the value at the end of the range is invalid. // In this case, OSS returns HTTP status code 206 and the data that is within the range of byte 500 to byte 999. // 2) If you set Range: bytes to 1000-2000, the value at the start of the range is invalid. // In this case, OSS returns HTTP status code 416 and the InvalidRange error code. RangeBehavior *string `input:"header,x-oss-range-behavior"` // The cache-control header to be returned in the response. ResponseCacheControl *string `input:"query,response-cache-control"` // The content-disposition header to be returned in the response. ResponseContentDisposition *string `input:"query,response-content-disposition"` // The content-encoding header to be returned in the response. ResponseContentEncoding *string `input:"query,response-content-encoding"` // The content-language header to be returned in the response. ResponseContentLanguage *string `input:"query,response-content-language"` // The content-type header to be returned in the response. ResponseContentType *string `input:"query,response-content-type"` // The expires header to be returned in the response. ResponseExpires *string `input:"query,response-expires"` // VersionId used to reference a specific version of the object. VersionId *string `input:"query,versionId"` // Specify the speed limit value. The speed limit value ranges from 245760 to 838860800, with a unit of bit/s. TrafficLimit int64 `input:"header,x-oss-traffic-limit"` // Progress callback function ProgressFn ProgressFunc // Image processing parameters Process *string `input:"query,x-oss-process"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type GetObjectResult ¶
type GetObjectResult struct { // Size of the body in bytes. -1 indicates that the Content-Length dose not exist. ContentLength int64 `output:"header,Content-Length"` // The portion of the object returned in the response. ContentRange *string `output:"header,Content-Range"` // A standard MIME type describing the format of the object data. ContentType *string `output:"header,Content-Type"` // The entity tag (ETag). An ETag is created when an object is created to identify the content of the object. ETag *string `output:"header,ETag"` // The time when the returned objects were last modified. LastModified *time.Time `output:"header,Last-Modified,time"` // The storage class of the object. StorageClass *string `output:"header,x-oss-storage-class"` // Content-Md5 for the uploaded object. ContentMD5 *string `output:"header,Content-MD5"` // A map of metadata to store with the object. Metadata map[string]string `output:"header,x-oss-meta-,usermeta"` // If the requested object is encrypted by using a server-side encryption algorithm based on entropy encoding, // OSS automatically decrypts the object and returns the decrypted object after OSS receives the GetObject request. // The x-oss-server-side-encryption header is included in the response to indicate // the encryption algorithm used to encrypt the object on the server. ServerSideEncryption *string `output:"header,x-oss-server-side-encryption"` //The ID of the customer master key (CMK) that is managed by Key Management Service (KMS). ServerSideDataEncryption *string `output:"header,x-oss-server-side-data-encryption"` // The ID of the customer master key (CMK) that is managed by Key Management Service (KMS). SSEKMSKeyId *string `output:"header,x-oss-server-side-encryption-key-id"` // The type of the object. ObjectType *string `output:"header,x-oss-object-type"` // The position for the next append operation. // If the type of the object is Appendable, this header is included in the response. NextAppendPosition *string `output:"header,x-oss-next-append-position"` // The 64-bit CRC value of the object. // This value is calculated based on the ECMA-182 standard. HashCRC64 *string `output:"header,x-oss-hash-crc64ecma"` // The lifecycle information about the object. // If lifecycle rules are configured for the object, this header is included in the response. // This header contains the following parameters: expiry-date that indicates the expiration time of the object, // and rule-id that indicates the ID of the matched lifecycle rule. Expiration *string `output:"header,x-oss-expiration"` // The status of the object when you restore an object. // If the storage class of the bucket is Archive and a RestoreObject request is submitted, Restore *string `output:"header,x-oss-restore"` // The result of an event notification that is triggered for the object. ProcessStatus *string `output:"header,x-oss-process-status"` // The number of tags added to the object. // This header is included in the response only when you have read permissions on tags. TaggingCount int32 `output:"header,x-oss-tagging-count"` // Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. DeleteMarker bool `output:"header,x-oss-delete-marker"` // Version of the object. VersionId *string `output:"header,x-oss-version-id"` // Object data. Body io.ReadCloser ResultCommon }
type GetObjectTaggingRequest ¶
type GetObjectTaggingRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // Version of the object. VersionId *string `input:"query,versionId"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type GetObjectTaggingResult ¶
type GetObjectTaggingResult struct { // Version of the object. VersionId *string `output:"header,x-oss-version-id"` // The container used to store the collection of tags. Tags []Tag `xml:"TagSet>Tag"` ResultCommon }
type GetPublicAccessBlockRequest ¶ added in v1.1.0
type GetPublicAccessBlockRequest struct {
RequestCommon
}
type GetPublicAccessBlockResult ¶ added in v1.1.0
type GetPublicAccessBlockResult struct { // The container in which the Block Public Access configurations are stored. PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `output:"body,PublicAccessBlockConfiguration,xml"` ResultCommon }
type GetStyleRequest ¶ added in v1.1.0
type GetStyleRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the image style. StyleName *string `input:"query,styleName,required"` RequestCommon }
type GetStyleResult ¶ added in v1.1.0
type GetStyleResult struct { // The container that stores the information about the image style. Style *StyleInfo `output:"body,Style,xml"` ResultCommon }
type GetSymlinkRequest ¶
type GetSymlinkRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // Version of the object. VersionId *string `input:"query,versionId"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type GetSymlinkResult ¶
type GetSymlinkResult struct { // Version of the object. VersionId *string `output:"header,x-oss-version-id"` // Indicates the target object that the symbol link directs to. Target *string `output:"header,x-oss-symlink-target"` // Entity tag for the uploaded object. ETag *string `output:"header,ETag"` // The metadata of the object that you want to symlink. Metadata map[string]string `output:"header,x-oss-meta-,usermeta"` ResultCommon }
type GetUserDefinedLogFieldsConfigRequest ¶ added in v1.1.0
type GetUserDefinedLogFieldsConfigRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type GetUserDefinedLogFieldsConfigResult ¶ added in v1.1.0
type GetUserDefinedLogFieldsConfigResult struct { // The container for the user-defined logging configuration. UserDefinedLogFieldsConfiguration *UserDefinedLogFieldsConfiguration `output:"body,UserDefinedLogFieldsConfiguration,xml"` ResultCommon }
type HTTPContentRange ¶
func (HTTPContentRange) FormatHTTPContentRange ¶
func (r HTTPContentRange) FormatHTTPContentRange() *string
type HTTPRange ¶
func ParseRange ¶
ParseRange parses a HTTPRange from a Range: header. It only accepts single ranges.
func (HTTPRange) FormatHTTPRange ¶
type HeadObjectRequest ¶
type HeadObjectRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // The version ID of the source object. VersionId *string `input:"query,versionId"` // If the ETag specified in the request matches the ETag value of the object, // the object and 200 OK are returned. Otherwise, 412 Precondition Failed is returned. IfMatch *string `input:"header,If-Match"` // If the ETag specified in the request does not match the ETag value of the object, // the object and 200 OK are returned. Otherwise, 304 Not Modified is returned. IfNoneMatch *string `input:"header,If-None-Match"` // If the time specified in this header is earlier than the object modified time or is invalid, // the object and 200 OK are returned. Otherwise, 304 Not Modified is returned. // The time must be in GMT. Example: Fri, 13 Nov 2015 14:47:53 GMT. IfModifiedSince *string `input:"header,If-Modified-Since"` // If the time specified in this header is the same as or later than the object modified time, // the object and 200 OK are returned. Otherwise, 412 Precondition Failed is returned. // The time must be in GMT. Example: Fri, 13 Nov 2015 14:47:53 GMT. IfUnmodifiedSince *string `input:"header,If-Unmodified-Since"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type HeadObjectResult ¶
type HeadObjectResult struct { // Size of the body in bytes. -1 indicates that the Content-Length dose not exist. ContentLength int64 `output:"header,Content-Length"` // A standard MIME type describing the format of the object data. ContentType *string `output:"header,Content-Type"` // The entity tag (ETag). An ETag is created when an object is created to identify the content of the object. ETag *string `output:"header,ETag"` // The time when the returned objects were last modified. LastModified *time.Time `output:"header,Last-Modified,time"` // The storage class of the object. StorageClass *string `output:"header,x-oss-storage-class"` // Content-Md5 for the uploaded object. ContentMD5 *string `output:"header,Content-MD5"` // A map of metadata to store with the object. Metadata map[string]string `output:"header,x-oss-meta-,usermeta"` // If the requested object is encrypted by using a server-side encryption algorithm based on entropy encoding, // OSS automatically decrypts the object and returns the decrypted object after OSS receives the GetObject request. // The x-oss-server-side-encryption header is included in the response to indicate // the encryption algorithm used to encrypt the object on the server. ServerSideEncryption *string `output:"header,x-oss-server-side-encryption"` // The ID of the customer master key (CMK) that is managed by Key Management Service (KMS). ServerSideDataEncryption *string `output:"header,x-oss-server-side-data-encryption"` // The ID of the customer master key (CMK) that is managed by Key Management Service (KMS). SSEKMSKeyId *string `output:"header,x-oss-server-side-encryption-key-id"` // The type of the object. ObjectType *string `output:"header,x-oss-object-type"` // The position for the next append operation. // If the type of the object is Appendable, this header is included in the response. NextAppendPosition *string `output:"header,x-oss-next-append-position"` // The 64-bit CRC value of the object. // This value is calculated based on the ECMA-182 standard. HashCRC64 *string `output:"header,x-oss-hash-crc64ecma"` // The lifecycle information about the object. // If lifecycle rules are configured for the object, this header is included in the response. // This header contains the following parameters: expiry-date that indicates the expiration time of the object, // and rule-id that indicates the ID of the matched lifecycle rule. Expiration *string `output:"header,x-oss-expiration"` // The status of the object when you restore an object. // If the storage class of the bucket is Archive and a RestoreObject request is submitted, Restore *string `output:"header,x-oss-restore"` // The result of an event notification that is triggered for the object. ProcessStatus *string `output:"header,x-oss-process-status"` // The requester. This header is included in the response if the pay-by-requester mode // is enabled for the bucket and the requester is not the bucket owner. The value of this header is requester RequestCharged *string `output:"header,x-oss-request-charged"` // The number of tags added to the object. // This header is included in the response only when you have read permissions on tags. TaggingCount int32 `output:"header,x-oss-tagging-count"` // Version of the object. VersionId *string `output:"header,x-oss-version-id"` // The origins allowed for cross-origin resource sharing (CORS). // If a CORS rule is configured for the bucket that stores the object and the Origin header // in the request meets the CORS rule, this header is included in the response. AllowOrigin *string `output:"header,Access-Control-Allow-Origin"` // The methods allowed for CORS. If a CORS rule is configured for the bucket that stores the object // and the Access-Control-Request-Method header in the request meets the CORS rule, this header is included in the response. AllowMethods *string `output:"header,Access-Control-Allow-Methods"` // The maximum caching period for CORS. If a CORS rule is configured for the bucket that stores // the object and the request meets the CORS rule, this header is included in the response. AllowAge *string `output:"header,Access-Control-Allow-Age"` // The headers allowed for CORS. If a CORS rule is configured for the bucket that stores // the object and the request meets the CORS rule, this header is included in the response AllowHeaders *string `output:"header,Access-Control-Allow-Headers"` // The headers that can be accessed by JavaScript applications on the client. // If a CORS rule is configured for the bucket that stores the object and the request meets // the CORS rule, this header is included in the response ExposeHeaders *string `output:"header,Access-Control-Expose-Headers"` // The caching behavior of the web page when the object is downloaded. CacheControl *string `output:"header,Cache-Control"` // The method that is used to access the object. ContentDisposition *string `output:"header,Content-Disposition"` // The method that is used to encode the object. ContentEncoding *string `output:"header,Content-Encoding"` // The expiration time of the cache in UTC. Expires *string `output:"header,Expires"` ResultCommon }
type HistoricalObjectReplicationType ¶ added in v1.1.0
type HistoricalObjectReplicationType string
const ( HistoricalObjectReplicationEnabled HistoricalObjectReplicationType = "enabled" HistoricalObjectReplicationDisabled HistoricalObjectReplicationType = "disabled" )
Enum values for HistoricalObjectReplicationType
type HttpsConfiguration ¶ added in v1.1.0
type HttpsConfiguration struct { // The container that stores TLS version configurations. TLS *TLS `xml:"TLS"` }
type IndexDocument ¶ added in v1.1.0
type IndexDocument struct { // The default homepage. Suffix *string `xml:"Suffix"` // Specifies whether to redirect the access to the default homepage of the subdirectory when the subdirectory is accessed. Valid values:* **true**: The access is redirected to the default homepage of the subdirectory.* **false** (default): The access is redirected to the default homepage of the root directory.For example, the default homepage is set to index.html, and `bucket.oss-cn-hangzhou.aliyuncs.com/subdir/` is the site that you want to access. If **SupportSubDir** is set to false, the access is redirected to `bucket.oss-cn-hangzhou.aliyuncs.com/index.html`. If **SupportSubDir** is set to true, the access is redirected to `bucket.oss-cn-hangzhou.aliyuncs.com/subdir/index.html`. SupportSubDir *bool `xml:"SupportSubDir"` // The operation to perform when the default homepage is set, the name of the accessed object does not end with a forward slash (/), and the object does not exist. This parameter takes effect only when **SupportSubDir** is set to true. It takes effect after RoutingRule but before ErrorFile. For example, the default homepage is set to index.html, `bucket.oss-cn-hangzhou.aliyuncs.com/abc` is the site that you want to access, and the abc object does not exist. In this case, different operations are performed based on the value of **Type**.* **0** (default): OSS checks whether the object named abc/index.html, which is in the `Object + Forward slash (/) + Homepage` format, exists. If the object exists, OSS returns HTTP status code 302 and the Location header value that contains URL-encoded `/abc/`. The URL-encoded /abc/ is in the `Forward slash (/) + Object + Forward slash (/)` format. If the object does not exist, OSS returns HTTP status code 404 and continues to check ErrorFile.* **1**: OSS returns HTTP status code 404 and the NoSuchKey error code and continues to check ErrorFile.* **2**: OSS checks whether abc/index.html exists. If abc/index.html exists, the content of the object is returned. If abc/index.html does not exist, OSS returns HTTP status code 404 and continues to check ErrorFile. Type *int64 `xml:"Type"` }
type InitiateBucketWormRequest ¶ added in v1.1.0
type InitiateBucketWormRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The container of the request body. InitiateWormConfiguration *InitiateWormConfiguration `input:"body,InitiateWormConfiguration,xml,required"` RequestCommon }
type InitiateBucketWormResult ¶ added in v1.1.0
type InitiateBucketWormResult struct { // The ID of the retention policy. WormId *string `output:"header,x-oss-worm-id"` ResultCommon }
type InitiateMultipartUploadRequest ¶
type InitiateMultipartUploadRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // The encoding type of the object names in the response. Valid value: url EncodingType *string `input:"query,encoding-type"` // The caching behavior of the web page when the object is downloaded. CacheControl *string `input:"header,Cache-Control"` // The method that is used to access the object. ContentDisposition *string `input:"header,Content-Disposition"` // The method that is used to encode the object. ContentEncoding *string `input:"header,Content-Encoding"` // A standard MIME type describing the format of the contents. ContentType *string `input:"header,Content-Type"` // The expiration time of the cache in UTC. Expires *string `input:"header,Expires"` // Specifies whether the InitiateMultipartUpload operation overwrites // the existing object that has the same name as the object that you want to upload. // Valid values: true and false ForbidOverwrite *string `input:"header,x-oss-forbid-overwrite"` // The encryption method on the server side when an object is created. // Valid values: AES256 and KMS ServerSideEncryption *string `input:"header,x-oss-server-side-encryption"` // The ID of the customer master key (CMK) that is managed by Key Management Service (KMS). // This header is valid only when the x-oss-server-side-encryption header is set to KMS. ServerSideDataEncryption *string `input:"header,x-oss-server-side-data-encryption"` // The ID of the customer master key (CMK) that is managed by Key Management Service (KMS). SSEKMSKeyId *string `input:"header,x-oss-server-side-encryption-key-id"` // The storage class of the object. StorageClass StorageClassType `input:"header,x-oss-storage-class"` // The metadata of the object that you want to upload. Metadata map[string]string `input:"header,x-oss-meta-,usermeta"` // The tags that are specified for the object by using a key-value pair. // You can specify multiple tags for an object. Example: TagA=A&TagB=B. Tagging *string `input:"header,x-oss-tagging"` // The total size when using client side encryption, only valid in EncryptionClient CSEDataSize *int64 // The part size when using client side encryption, only valid in EncryptionClient // CSEPartSize must aligned to the secret iv length CSEPartSize *int64 // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` // To disable the feature that Content-Type is automatically added based on the object name if not specified. DisableAutoDetectMimeType bool RequestCommon }
type InitiateMultipartUploadResult ¶
type InitiateMultipartUploadResult struct { // The name of the bucket to which the object is uploaded by the multipart upload task. Bucket *string `xml:"Bucket"` // The name of the object that is uploaded by the multipart upload task. Key *string `xml:"Key"` // The upload ID that uniquely identifies the multipart upload task. UploadId *string `xml:"UploadId"` // The encoding type of the object names in the response. Valid value: url EncodingType *string `xml:"EncodingType"` // The encryption context for multipart upload when using client side encryption, only valid in EncryptionClient CSEMultiPartContext *EncryptionMultiPartContext ResultCommon }
type InitiateWormConfiguration ¶ added in v1.1.0
type InitiateWormConfiguration struct { // The number of days for which objects can be retained. RetentionPeriodInDays *int32 `xml:"RetentionPeriodInDays"` }
type InputSerialization ¶
type InputSerialization struct { CSV *InputSerializationCSV `xml:"CSV"` JSON *InputSerializationJSON `xml:"JSON"` CompressionType *string `xml:"CompressionType"` }
type InputSerializationCSV ¶
type InputSerializationJSON ¶
type InputSerializationJSON struct {
JSONType *string `xml:"Type"`
}
type InputSerializationSelect ¶
type InputSerializationSelect struct { CsvBodyInput *CSVSelectInput `xml:"CSV"` JsonBodyInput *JSONSelectInput `xml:"JSON"` CompressionType *string `xml:"CompressionType"` }
type InvalidParamError ¶
func NewErrParamInvalid ¶
func NewErrParamInvalid(field string) InvalidParamError
func NewErrParamNull ¶
func NewErrParamNull(field string) InvalidParamError
func NewErrParamRequired ¶
func NewErrParamRequired(field string) InvalidParamError
func NewErrParamTypeNotSupport ¶
func NewErrParamTypeNotSupport(field string) InvalidParamError
type InventoryConfiguration ¶ added in v1.1.0
type InventoryConfiguration struct { // The name of the inventory. The name must be unique in the bucket. Id *string `xml:"Id"` // Specifies whether to enable the bucket inventory feature. Valid values:* true* false IsEnabled *bool `xml:"IsEnabled"` // The container that stores the exported inventory lists. Destination *InventoryDestination `xml:"Destination"` // The container that stores information about the frequency at which inventory lists are exported. Schedule *InventorySchedule `xml:"Schedule"` // The container that stores the prefix used to filter objects. Only objects whose names contain the specified prefix are included in the inventory. Filter *InventoryFilter `xml:"Filter"` // Specifies whether to include the version information about the objects in inventory lists. Valid values:* All: The information about all versions of the objects is exported.* Current: Only the information about the current versions of the objects is exported. IncludedObjectVersions *string `xml:"IncludedObjectVersions"` // The container that stores the configuration fields in inventory lists. OptionalFields *OptionalFields `xml:"OptionalFields"` }
type InventoryDestination ¶ added in v1.1.0
type InventoryDestination struct { // The container that stores information about the bucket in which exported inventory lists are stored. OSSBucketDestination *InventoryOSSBucketDestination `xml:"OSSBucketDestination"` }
type InventoryEncryption ¶ added in v1.1.0
type InventoryFilter ¶ added in v1.1.0
type InventoryFilter struct { // The beginning of the time range during which the object was last modified. Unit: seconds.Valid values: [1262275200, 253402271999] LastModifyBeginTimeStamp *int64 `xml:"LastModifyBeginTimeStamp"` // The end of the time range during which the object was last modified. Unit: seconds.Valid values: [1262275200, 253402271999] LastModifyEndTimeStamp *int64 `xml:"LastModifyEndTimeStamp"` // The minimum size of the specified object. Unit: B.Valid values: [0 B, 48.8 TB] LowerSizeBound *int64 `xml:"LowerSizeBound"` // The maximum size of the specified object. Unit: B.Valid values: (0 B, 48.8 TB] UpperSizeBound *int64 `xml:"UpperSizeBound"` // The storage class of the object. You can specify multiple storage classes.Valid values:StandardIAArchiveColdArchiveAll StorageClass *string `xml:"StorageClass"` // The prefix that is specified in the inventory. Prefix *string `xml:"Prefix"` }
type InventoryFormatType ¶ added in v1.1.0
type InventoryFormatType string
InventoryFormatType The format of exported inventory lists
const (
InventoryFormatCSV InventoryFormatType = "CSV"
)
InventoryFormatCSV Enum values for InventoryFormatType
type InventoryFrequencyType ¶ added in v1.1.0
type InventoryFrequencyType string
InventoryFrequencyType The frequency at which inventory lists are exported
const ( InventoryFrequencyDaily InventoryFrequencyType = "Daily" InventoryFrequencyWeekly InventoryFrequencyType = "Weekly" )
Enum values for InventoryFrequencyType
type InventoryOSSBucketDestination ¶ added in v1.1.0
type InventoryOSSBucketDestination struct { // The format of exported inventory lists. The exported inventory lists are CSV objects compressed by using GZIP. Format InventoryFormatType `xml:"Format"` // The ID of the account to which permissions are granted by the bucket owner. AccountId *string `xml:"AccountId"` // The Alibaba Cloud Resource Name (ARN) of the role that has the permissions to read all objects from the source bucket and write objects to the destination bucket. Format: `acs:ram::uid:role/rolename`. RoleArn *string `xml:"RoleArn"` // The name of the bucket in which exported inventory lists are stored. Bucket *string `xml:"Bucket"` // The prefix of the path in which the exported inventory lists are stored. Prefix *string `xml:"Prefix"` // The container that stores the encryption method of the exported inventory lists. Encryption *InventoryEncryption `xml:"Encryption"` }
type InventoryOptionalFieldType ¶ added in v1.1.0
type InventoryOptionalFieldType string
InventoryOptionalFieldType The configuration fields that are included in inventory lists.
const ( InventoryOptionalFieldSize InventoryOptionalFieldType = "Size" InventoryOptionalFieldLastModifiedDate InventoryOptionalFieldType = "LastModifiedDate" InventoryOptionalFieldETag InventoryOptionalFieldType = "ETag" InventoryOptionalFieldStorageClass InventoryOptionalFieldType = "StorageClass" InventoryOptionalFieldIsMultipartUploaded InventoryOptionalFieldType = "IsMultipartUploaded" InventoryOptionalFieldEncryptionStatus InventoryOptionalFieldType = "EncryptionStatus" )
Enum values for InventoryOptionalFieldType
type InventorySchedule ¶ added in v1.1.0
type InventorySchedule struct { // The frequency at which the inventory list is exported. Valid values:- Daily: The inventory list is exported on a daily basis. - Weekly: The inventory list is exported on a weekly basis. Frequency InventoryFrequencyType `xml:"Frequency"` }
type IsObjectExistOptions ¶
type JSONSelectInput ¶
type JSONSelectOutput ¶
type JSONSelectOutput struct {
RecordDelimiter *string `xml:"RecordDelimiter"`
}
type JsonMetaRequest ¶
type JsonMetaRequest struct { InputSerialization *InputSerialization `xml:"InputSerialization"` OverwriteIfExists *bool `xml:"OverwriteIfExists"` }
type LifecycleConfiguration ¶ added in v1.1.0
type LifecycleConfiguration struct { // The container that stores the lifecycle rules. Rules []LifecycleRule `xml:"Rule"` }
type LifecycleRule ¶ added in v1.1.0
type LifecycleRule struct { // Specifies whether to enable the rule. Valid values:* Enabled: enables the rule. OSS periodically executes the rule.* Disabled: does not enable the rule. OSS ignores the rule. Status *string `xml:"Status"` // The delete operation that you want OSS to perform on the parts that are uploaded in incomplete multipart upload tasks when the parts expire. AbortMultipartUpload *LifecycleRuleAbortMultipartUpload `xml:"AbortMultipartUpload"` // Timestamp for when access tracking was enabled. AtimeBase *int64 `xml:"AtimeBase"` // The conversion of the storage class of previous versions of the objects that match the lifecycle rule when the previous versions expire. The storage class of the previous versions can be converted to IA or Archive. The period of time from when the previous versions expire to when the storage class of the previous versions is converted to Archive must be longer than the period of time from when the previous versions expire to when the storage class of the previous versions is converted to IA. NoncurrentVersionTransitions []NoncurrentVersionTransition `xml:"NoncurrentVersionTransition"` // The container that stores the Not parameter that is used to filter objects. Filter *LifecycleRuleFilter `xml:"Filter"` // The ID of the lifecycle rule. The ID can contain up to 255 characters. If you do not specify the ID, OSS automatically generates a unique ID for the lifecycle rule. ID *string `xml:"ID"` // The prefix in the names of the objects to which the rule applies. The prefixes specified by different rules cannot overlap.* If Prefix is specified, this rule applies only to objects whose names contain the specified prefix in the bucket.* If Prefix is not specified, this rule applies to all objects in the bucket. Prefix *string `xml:"Prefix"` // The delete operation to perform on objects based on the lifecycle rule. For an object in a versioning-enabled bucket, the delete operation specified by this parameter is performed only on the current version of the object.The period of time from when the objects expire to when the objects are deleted must be longer than the period of time from when the objects expire to when the storage class of the objects is converted to IA or Archive. Expiration *LifecycleRuleExpiration `xml:"Expiration"` // The conversion of the storage class of objects that match the lifecycle rule when the objects expire. The storage class of the objects can be converted to IA, Archive, and ColdArchive. The storage class of Standard objects in a Standard bucket can be converted to IA, Archive, or Cold Archive. The period of time from when the objects expire to when the storage class of the objects is converted to Archive must be longer than the period of time from when the objects expire to when the storage class of the objects is converted to IA. For example, if the validity period is set to 30 for objects whose storage class is converted to IA after the validity period, the validity period must be set to a value greater than 30 for objects whose storage class is converted to Archive. Either Days or CreatedBeforeDate is required. Transitions []LifecycleRuleTransition `xml:"Transition"` // The tag of the objects to which the lifecycle rule applies. You can specify multiple tags. Tags []Tag `xml:"Tag"` // The delete operation that you want OSS to perform on the previous versions of the objects that match the lifecycle rule when the previous versions expire. NoncurrentVersionExpiration *NoncurrentVersionExpiration `xml:"NoncurrentVersionExpiration"` }
type LifecycleRuleAbortMultipartUpload ¶ added in v1.1.0
type LifecycleRuleAbortMultipartUpload struct { Days *int32 `xml:"Days"` // The date based on which the lifecycle rule takes effect. OSS performs the specified operation on data whose last modified date is earlier than this date. Specify the time in the ISO 8601 standard. The time must be at 00:00:00 in UTC. CreatedBeforeDate *string `xml:"CreatedBeforeDate"` // Deprecated: please use Days or CreateDateBefore. // The date after which the lifecycle rule takes effect. If the specified time is earlier than the current moment, it'll takes effect immediately. (This fields is NOT RECOMMENDED, please use Days or CreateDateBefore) Date *string `xml:"Date"` }
type LifecycleRuleExpiration ¶ added in v1.1.0
type LifecycleRuleExpiration struct { // The date based on which the lifecycle rule takes effect. OSS performs the specified operation on data whose last modified date is earlier than this date. The value of this parameter is in the yyyy-MM-ddT00:00:00.000Z format.Specify the time in the ISO 8601 standard. The time must be at 00:00:00 in UTC. CreatedBeforeDate *string `xml:"CreatedBeforeDate"` // The number of days from when the objects were last modified to when the lifecycle rule takes effect. Days *int32 `xml:"Days"` // Specifies whether to automatically remove expired delete markers.* true: Expired delete markers are automatically removed. If you set this parameter to true, you cannot specify the Days or CreatedBeforeDate parameter.* false: Expired delete markers are not automatically removed. If you set this parameter to false, you must specify the Days or CreatedBeforeDate parameter. ExpiredObjectDeleteMarker *bool `xml:"ExpiredObjectDeleteMarker"` // Deprecated: please use Days or CreateDateBefore. // The date after which the lifecycle rule takes effect. If the specified time is earlier than the current moment, it'll takes effect immediately. (This fields is NOT RECOMMENDED, please use Days or CreateDateBefore) Date *string `xml:"Date"` }
type LifecycleRuleFilter ¶ added in v1.1.0
type LifecycleRuleFilter struct { // The condition that is matched by objects to which the lifecycle rule does not apply. Not *LifecycleRuleNot `xml:"Not"` // This lifecycle rule only applies to files larger than this size. ObjectSizeGreaterThan *int64 `xml:"ObjectSizeGreaterThan"` // This lifecycle rule only applies to files smaller than this size. ObjectSizeLessThan *int64 `xml:"ObjectSizeLessThan"` }
type LifecycleRuleNot ¶ added in v1.1.0
type LifecycleRuleTransition ¶ added in v1.1.0
type LifecycleRuleTransition struct { // The date based on which the lifecycle rule takes effect. OSS performs the specified operation on data whose last modified date is earlier than this date. Specify the time in the ISO 8601 standard. The time must be at 00:00:00 in UTC. CreatedBeforeDate *string `xml:"CreatedBeforeDate"` // The number of days from when the objects were last modified to when the lifecycle rule takes effect. Days *int32 `xml:"Days"` // The storage class to which objects are converted. Valid values:* IA* Archive* ColdArchive You can convert the storage class of objects in an IA bucket to only Archive or Cold Archive. StorageClass StorageClassType `xml:"StorageClass"` // Specifies whether the lifecycle rule applies to objects based on their last access time. Valid values:* true: The rule applies to objects based on their last access time.* false: The rule applies to objects based on their last modified time. IsAccessTime *bool `xml:"IsAccessTime"` // Specifies whether to convert the storage class of non-Standard objects back to Standard after the objects are accessed. This parameter takes effect only when the IsAccessTime parameter is set to true. Valid values:* true: converts the storage class of the objects to Standard.* false: does not convert the storage class of the objects to Standard. ReturnToStdWhenVisit *bool `xml:"ReturnToStdWhenVisit"` // Specifies whether to convert the storage class of objects whose sizes are less than 64 KB to IA, Archive, or Cold Archive based on their last access time. Valid values:* true: converts the storage class of objects that are smaller than 64 KB to IA, Archive, or Cold Archive. Objects that are smaller than 64 KB are charged as 64 KB. Objects that are greater than or equal to 64 KB are charged based on their actual sizes. If you set this parameter to true, the storage fees may increase.* false: does not convert the storage class of an object that is smaller than 64 KB. AllowSmallFile *bool `xml:"AllowSmallFile"` }
type LimitedReadCloser ¶
type LimitedReadCloser struct { *io.LimitedReader io.Closer }
type ListAccessPointsRequest ¶ added in v1.1.2
type ListAccessPointsRequest struct { // The maximum number of access points that can be returned. Valid values:* For user-level access points: (0,1000].* For bucket-level access points: (0,100]. MaxKeys int64 `input:"query,max-keys"` // The token from which the listing operation starts. You must specify the value of NextContinuationToken that is obtained from the previous query as the value of continuation-token. ContinuationToken *string `input:"query,continuation-token"` // The name of the bucket. Bucket *string `input:"host,bucket"` RequestCommon }
type ListAccessPointsResult ¶ added in v1.1.2
type ListAccessPointsResult struct { // The maximum number of results set for this enumeration operation. MaxKeys *int32 `xml:"MaxKeys"` // Indicates whether the returned list is truncated. Valid values: * true: indicates that not all results are returned. * false: indicates that all results are returned. IsTruncated *bool `xml:"IsTruncated"` // Indicates that this ListAccessPoints request does not return all results that can be listed. You can use NextContinuationToken to continue obtaining list results. NextContinuationToken *string `xml:"NextContinuationToken"` // The ID of the Alibaba Cloud account to which the access point belongs. AccountId *string `xml:"AccountId"` // The container that stores the information about all access point. AccessPoints []AccessPoint `xml:"AccessPoints>AccessPoint"` ResultCommon }
type ListBucketInventoryRequest ¶ added in v1.1.0
type ListBucketInventoryRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // Specify the start position of the list operation. You can obtain this token from the NextContinuationToken field of last ListBucketInventory's result. ContinuationToken *string `input:"query,continuation-token"` RequestCommon }
type ListBucketInventoryResult ¶ added in v1.1.0
type ListBucketInventoryResult struct { // The container that stores inventory configuration list. ListInventoryConfigurationsResult *ListInventoryConfigurationsResult `output:"body,ListInventoryConfigurationsResult,xml"` ResultCommon }
type ListBucketsPaginator ¶
type ListBucketsPaginator struct {
// contains filtered or unexported fields
}
ListBucketsPaginator is a paginator for ListBuckets
func (*ListBucketsPaginator) HasNext ¶
func (p *ListBucketsPaginator) HasNext() bool
HasNext Returns true if there’s a next page.
func (*ListBucketsPaginator) NextPage ¶
func (p *ListBucketsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListBucketsResult, error)
NextPage retrieves the next ListBuckets page.
type ListBucketsRequest ¶
type ListBucketsRequest struct { // The name of the bucket from which the list operation begins. Marker *string `input:"query,marker"` // The maximum number of buckets that can be returned in the single query. // Valid values: 1 to 1000. MaxKeys int32 `input:"query,max-keys"` // The prefix that the names of returned buckets must contain. Prefix *string `input:"query,prefix"` // Limits the response to keys that begin with the specified prefix // The ID of the resource group. ResourceGroupId *string `input:"header,x-oss-resource-group-id"` RequestCommon }
type ListBucketsResult ¶
type ListBucketsResult struct { // The prefix contained in the names of the returned bucket. Prefix *string `xml:"Prefix"` // The name of the bucket after which the ListBuckets operation starts. Marker *string `xml:"Marker"` // The marker filter. // The maximum number of buckets that can be returned for the request. MaxKeys int32 `xml:"MaxKeys"` // Indicates whether all results are returned. // true: Only part of the results are returned for the request. // false: All results are returned for the request. IsTruncated bool `xml:"IsTruncated"` // The marker for the next ListBuckets request, which can be used to return the remaining results. NextMarker *string `xml:"NextMarker"` // The container that stores information about the bucket owner. Owner *Owner `xml:"Owner"` // The container that stores information about buckets. Buckets []BucketProperties `xml:"Buckets>Bucket"` ResultCommon }
type ListCnameRequest ¶ added in v1.1.1
type ListCnameRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type ListCnameResult ¶ added in v1.1.1
type ListCnameResult struct { // The container that is used to store the information about all CNAME records. Cnames []CnameInfo `xml:"Cname"` // The name of the bucket to which the CNAME records you want to query are mapped. Bucket *string `xml:"Bucket"` // The name of the bucket owner. Owner *string `xml:"Owner"` ResultCommon }
type ListInventoryConfigurationsResult ¶ added in v1.1.0
type ListInventoryConfigurationsResult struct { // The container that stores inventory configurations. InventoryConfigurations []InventoryConfiguration `xml:"InventoryConfiguration"` // Specifies whether to list all inventory tasks configured for the bucket.Valid values: true and false- The value of false indicates that all inventory tasks configured for the bucket are listed.- The value of true indicates that not all inventory tasks configured for the bucket are listed. To list the next page of inventory configurations, set the continuation-token parameter in the next request to the value of the NextContinuationToken header in the response to the current request. IsTruncated *bool `xml:"IsTruncated"` // If the value of IsTruncated in the response is true and value of this header is not null, set the continuation-token parameter in the next request to the value of this header. NextContinuationToken *string `xml:"NextContinuationToken"` }
type ListMultipartUploadsPaginator ¶
type ListMultipartUploadsPaginator struct {
// contains filtered or unexported fields
}
ListMultipartUploadsPaginator is a paginator for ListMultipartUploads
func (*ListMultipartUploadsPaginator) HasNext ¶
func (p *ListMultipartUploadsPaginator) HasNext() bool
HasNext Returns true if there’s a next page.
func (*ListMultipartUploadsPaginator) NextPage ¶
func (p *ListMultipartUploadsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListMultipartUploadsResult, error)
NextPage retrieves the next ListMultipartUploads page.
type ListMultipartUploadsRequest ¶
type ListMultipartUploadsRequest struct { // The name of the bucket. Bucket *string `input:"host,uploadId,required"` // The character that is used to group objects by name. If you specify the delimiter parameter in the request, // the response contains the CommonPrefixes parameter. The objects whose names contain the same string from // the prefix to the next occurrence of the delimiter are grouped as a single result element in CommonPrefixes. Delimiter *string `input:"query,delimiter"` // The encoding type of the content in the response. Valid value: url EncodingType *string `input:"query,encoding-type"` // This parameter is used together with the upload-id-marker parameter to specify // the position from which the next list begins. KeyMarker *string `input:"query,key-marker"` // The maximum number of multipart upload tasks that can be returned for the current request. // Default value: 1000. Maximum value: 1000. MaxUploads int32 `input:"query,max-uploads"` // The prefix that the names of the returned objects must contain. Prefix *string `input:"query,prefix"` // The upload ID of the multipart upload task after which the list begins. // This parameter is used together with the key-marker parameter. UploadIdMarker *string `input:"query,upload-id-marker"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type ListMultipartUploadsResult ¶
type ListMultipartUploadsResult struct { // The method used to encode the object name in the response. // If encoding-type is specified in the request, values of those elements including // Delimiter, KeyMarker, Prefix, NextKeyMarker, and Key are encoded in the returned result. EncodingType *string `xml:"EncodingType"` // The name of the bucket. Bucket *string `xml:"Bucket"` // The name of the object that corresponds to the multipart upload task after which the list begins. KeyMarker *string `xml:"KeyMarker"` // The upload ID of the multipart upload task after which the list begins. UploadIdMarker *string `xml:"UploadIdMarker"` // The upload ID of the multipart upload task after which the list begins. NextKeyMarker *string `xml:"NextKeyMarker"` // The NextUploadMarker value that is used for the UploadMarker value in // the next request if the response does not contain all required results. NextUploadIdMarker *string `xml:"NextUploadIdMarker"` // The character that is used to group objects by name. Delimiter *string `xml:"Delimiter"` // The prefix contained in the returned object names. Prefix *string `xml:"Prefix"` // The maximum number of multipart upload tasks returned by OSS. MaxUploads int32 `xml:"MaxUploads"` // Indicates whether the list of multipart upload tasks returned in the response is truncated. // true: Only part of the results are returned this time. // false: All results are returned. IsTruncated bool `xml:"IsTruncated"` Uploads []Upload `xml:"Upload"` ResultCommon }
type ListObjectVersionsPaginator ¶
type ListObjectVersionsPaginator struct {
// contains filtered or unexported fields
}
ListObjectVersionsPaginator is a paginator for ListObjectVersions
func (*ListObjectVersionsPaginator) HasNext ¶
func (p *ListObjectVersionsPaginator) HasNext() bool
HasNext Returns true if there’s a next page.
func (*ListObjectVersionsPaginator) NextPage ¶
func (p *ListObjectVersionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListObjectVersionsResult, error)
NextPage retrieves the next ListObjectVersions page.
type ListObjectVersionsRequest ¶
type ListObjectVersionsRequest struct { // The name of the bucket containing the objects Bucket *string `input:"host,bucket,required"` // The character that is used to group objects by name. If you specify the delimiter parameter in the request, // the response contains the CommonPrefixes parameter. The objects whose names contain the same string from // the prefix to the next occurrence of the delimiter are grouped as a single result element in CommonPrefixes. Delimiter *string `input:"query,delimiter"` // Specifies that objects whose names are alphabetically after the value of the key-marker parameter are returned. // This parameter can be specified together with version-id-marker. // By default, this parameter is left empty. KeyMarker *string `input:"query,key-marker"` // Specifies that the versions created before the version specified by version-id-marker for the object // whose name is specified by key-marker are returned by creation time in descending order. // By default, if this parameter is not specified, the results are returned from the latest // version of the object whose name is alphabetically after the value of key-marker. VersionIdMarker *string `input:"query,version-id-marker"` // The maximum number of objects that you want to return. If the list operation cannot be complete at a time // because the max-keys parameter is specified, the NextMarker element is included in the response as the marker // for the next list operation. MaxKeys int32 `input:"query,max-keys"` // The prefix that the names of the returned objects must contain. Prefix *string `input:"query,prefix"` // The encoding type of the content in the response. Valid value: url EncodingType *string `input:"query,encoding-type"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` // To indicate that whether to stores the versions of objects and delete markers together in one container. // When false(default), stores the versions of objects into ListObjectVersionsResult.ObjectVersions, // When false(default), stores the delete markers into ListObjectVersionsResult.ObjectDeleteMarkers, // When true, stores the versions and delete markers into ListObjectVersionsResult.ObjectVersionsDeleteMarkers, IsMix bool RequestCommon }
type ListObjectVersionsResult ¶
type ListObjectVersionsResult struct { // The name of the bucket. Name *string `xml:"Name"` // Indicates the object from which the ListObjectVersions (GetBucketVersions) operation starts. KeyMarker *string `xml:"KeyMarker"` // The version from which the ListObjectVersions (GetBucketVersions) operation starts. // This parameter is used together with KeyMarker. VersionIdMarker *string `xml:"VersionIdMarker"` // If not all results are returned for the request, the NextKeyMarker parameter is included // in the response to indicate the key-marker value of the next ListObjectVersions (GetBucketVersions) request. NextKeyMarker *string `xml:"NextKeyMarker"` // If not all results are returned for the request, the NextVersionIdMarker parameter is included in // the response to indicate the version-id-marker value of the next ListObjectVersions (GetBucketVersions) request. NextVersionIdMarker *string `xml:"NextVersionIdMarker"` // The container that stores delete markers. ObjectDeleteMarkers []ObjectDeleteMarkerProperties `xml:"DeleteMarker"` // The container that stores the versions of objects, excluding delete markers. ObjectVersions []ObjectVersionProperties `xml:"Version"` // The container that stores the versions of objects and delete markers together in the order they are returned. // Only valid when ListObjectVersionsRequest.IsMix is set to true ObjectVersionsDeleteMarkers []ObjectMixProperties `xml:"ObjectMix"` // The prefix contained in the returned object names. Prefix *string `xml:"Prefix"` // The maximum number of returned objects in the response. MaxKeys int32 `xml:"MaxKeys"` // The character that is used to group objects by name. Delimiter *string `xml:"Delimiter"` // Indicates whether the returned results are truncated. // true indicates that not all results are returned this time. // false indicates that all results are returned this time. IsTruncated bool `xml:"IsTruncated"` // The encoding type of the content in the response. EncodingType *string `xml:"EncodingType"` // If the Delimiter parameter is specified in the request, the response contains the CommonPrefixes element. CommonPrefixes []CommonPrefix `xml:"CommonPrefixes"` ResultCommon }
type ListObjectsPaginator ¶
type ListObjectsPaginator struct {
// contains filtered or unexported fields
}
ListObjectsPaginator is a paginator for ListObjects
func (*ListObjectsPaginator) HasNext ¶
func (p *ListObjectsPaginator) HasNext() bool
HasNext Returns true if there’s a next page.
func (*ListObjectsPaginator) NextPage ¶
func (p *ListObjectsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListObjectsResult, error)
NextPage retrieves the next ListObjects page.
type ListObjectsRequest ¶
type ListObjectsRequest struct { // The name of the bucket containing the objects Bucket *string `input:"host,bucket,required"` // The character that is used to group objects by name. If you specify the delimiter parameter in the request, // the response contains the CommonPrefixes parameter. The objects whose names contain the same string from // the prefix to the next occurrence of the delimiter are grouped as a single result element in CommonPrefixes. Delimiter *string `input:"query,delimiter"` // The encoding type of the content in the response. Valid value: url EncodingType *string `input:"query,encoding-type"` // The name of the object after which the ListObjects (GetBucket) operation starts. // If this parameter is specified, objects whose names are alphabetically greater than the marker value are returned. Marker *string `input:"query,marker"` // The maximum number of objects that you want to return. If the list operation cannot be complete at a time // because the max-keys parameter is specified, the NextMarker element is included in the response as the marker // for the next list operation. MaxKeys int32 `input:"query,max-keys"` // The prefix that the names of the returned objects must contain. Prefix *string `input:"query,prefix"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type ListObjectsResult ¶
type ListObjectsResult struct { // The name of the bucket. Name *string `xml:"Name"` // The prefix contained in the returned object names. Prefix *string `xml:"Prefix"` // The name of the object after which the list operation begins. Marker *string `xml:"Marker"` // The maximum number of returned objects in the response. MaxKeys int32 `xml:"MaxKeys"` // The character that is used to group objects by name. Delimiter *string `xml:"Delimiter"` // Indicates whether the returned results are truncated. // true indicates that not all results are returned this time. // false indicates that all results are returned this time. IsTruncated bool `xml:"IsTruncated"` // The position from which the next list operation starts. NextMarker *string `xml:"NextMarker"` // The encoding type of the content in the response. EncodingType *string `xml:"EncodingType"` // The container that stores the metadata of the returned objects. Contents []ObjectProperties `xml:"Contents"` // If the Delimiter parameter is specified in the request, the response contains the CommonPrefixes element. CommonPrefixes []CommonPrefix `xml:"CommonPrefixes"` ResultCommon }
type ListObjectsV2Paginator ¶
type ListObjectsV2Paginator struct {
// contains filtered or unexported fields
}
ListObjectsV2Paginator is a paginator for ListObjectsV2
func (*ListObjectsV2Paginator) HasNext ¶
func (p *ListObjectsV2Paginator) HasNext() bool
HasNext Returns true if there’s a next page.
func (*ListObjectsV2Paginator) NextPage ¶
func (p *ListObjectsV2Paginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListObjectsV2Result, error)
NextPage retrieves the next ListObjectsV2 page.
type ListObjectsV2Request ¶
type ListObjectsV2Request struct { // The name of the bucket containing the objects Bucket *string `input:"host,bucket,required"` // The character that is used to group objects by name. If you specify the delimiter parameter in the request, // the response contains the CommonPrefixes parameter. The objects whose names contain the same string from // the prefix to the next occurrence of the delimiter are grouped as a single result element in CommonPrefixes. Delimiter *string `input:"query,delimiter"` // The name of the object after which the ListObjectsV2 (GetBucketV2) operation starts. // The objects are returned in alphabetical order of their names. The start-after parameter // is used to list the returned objects by page. // The value of the parameter must be less than 1,024 bytes in length. // Even if the specified start-after value does not exist during a conditional query, // the ListObjectsV2 (GetBucketV2) operation starts from the object whose name is alphabetically greater than the start-after value. // By default, this parameter is left empty. StartAfter *string `input:"query,start-after"` // The token from which the ListObjectsV2 (GetBucketV2) operation must start. // You can obtain the token from the NextContinuationToken parameter in the ListObjectsV2 (GetBucketV2) response. ContinuationToken *string `input:"query,continuation-token"` // The maximum number of objects that you want to return. If the list operation cannot be complete at a time // because the max-keys parameter is specified, the NextMarker element is included in the response as the marker // for the next list operation. MaxKeys int32 `input:"query,max-keys"` // The prefix that the names of the returned objects must contain. Prefix *string `input:"query,prefix"` // The encoding type of the content in the response. Valid value: url EncodingType *string `input:"query,encoding-type"` // Specifies whether to include information about the object owner in the response. FetchOwner bool `input:"query,fetch-owner"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type ListObjectsV2Result ¶
type ListObjectsV2Result struct { // The name of the bucket. Name *string `xml:"Name"` // The prefix contained in the returned object names. Prefix *string `xml:"Prefix"` // If the StartAfter parameter is specified in the request, the response contains the StartAfter parameter. StartAfter *string `xml:"StartAfter"` // The maximum number of returned objects in the response. MaxKeys int32 `xml:"MaxKeys"` // The character that is used to group objects by name. Delimiter *string `xml:"Delimiter"` // Indicates whether the returned results are truncated. // true indicates that not all results are returned this time. // false indicates that all results are returned this time. IsTruncated bool `xml:"IsTruncated"` // If the ContinuationToken parameter is specified in the request, the response contains the ContinuationToken parameter. ContinuationToken *string `xml:"ContinuationToken"` // The name of the object from which the next ListObjectsV2 (GetBucketV2) operation starts. // The NextContinuationToken value is used as the ContinuationToken value to query subsequent results. NextContinuationToken *string `xml:"NextContinuationToken"` // The encoding type of the content in the response. EncodingType *string `xml:"EncodingType"` // The container that stores the metadata of the returned objects. Contents []ObjectProperties `xml:"Contents"` // If the Delimiter parameter is specified in the request, the response contains the CommonPrefixes element. CommonPrefixes []CommonPrefix `xml:"CommonPrefixes"` // The number of objects returned for this request. If Delimiter is specified, KeyCount is the sum of the values of Key and CommonPrefixes. KeyCount int `xml:"KeyCount"` ResultCommon }
type ListPartsAPIClient ¶
type ListPartsAPIClient interface {
ListParts(ctx context.Context, request *ListPartsRequest, optFns ...func(*Options)) (*ListPartsResult, error)
}
type ListPartsPaginator ¶
type ListPartsPaginator struct {
// contains filtered or unexported fields
}
ListPartsPaginator is a paginator for ListParts
func NewListPartsPaginator ¶
func NewListPartsPaginator(c ListPartsAPIClient, request *ListPartsRequest, optFns ...func(*PaginatorOptions)) *ListPartsPaginator
func (*ListPartsPaginator) HasNext ¶
func (p *ListPartsPaginator) HasNext() bool
HasNext Returns true if there’s a next page.
func (*ListPartsPaginator) NextPage ¶
func (p *ListPartsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListPartsResult, error)
NextPage retrieves the next ListParts page.
type ListPartsRequest ¶
type ListPartsRequest struct { // The name of the bucket. Bucket *string `input:"host,uploadId,required"` // The name of the object. Key *string `input:"path,key,required"` // The ID of the multipart upload task. UploadId *string `input:"query,uploadId,required"` // The encoding type of the content in the response. Valid value: url EncodingType *string `input:"query,encoding-type"` // The maximum number of parts that can be returned by OSS. // Default value: 1000. Maximum value: 1000. MaxParts int32 `input:"query,max-parts"` // The position from which the list starts. // All parts whose part numbers are greater than the value of this parameter are listed. PartNumberMarker int32 `input:"query,part-number-marker"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type ListPartsResult ¶
type ListPartsResult struct { // The method used to encode the object name in the response. // If encoding-type is specified in the request, values of those elements including // Delimiter, KeyMarker, Prefix, NextKeyMarker, and Key are encoded in the returned result. EncodingType *string `xml:"EncodingType"` // The name of the bucket. Bucket *string `xml:"Bucket"` // The name of the object that corresponds to the multipart upload task after which the list begins. Key *string `xml:"Key"` // The ID of the upload task. UploadId *string `xml:"UploadId"` // The position from which the list starts. // All parts whose part numbers are greater than the value of this parameter are listed. PartNumberMarker int32 `xml:"PartNumberMarker"` // The NextPartNumberMarker value that is used for the PartNumberMarker value in a subsequent // request when the response does not contain all required results. NextPartNumberMarker int32 `xml:"NextPartNumberMarker"` // he maximum number of parts in the response. MaxParts int32 `xml:"MaxParts"` // Indicates whether the list of parts returned in the response has been truncated. // true: Only part of the results are returned this time. // false: All results are returned. IsTruncated bool `xml:"IsTruncated"` // The storage class of the object. StorageClass *string `xml:"StorageClass"` // The encrypted data key. // The encrypted data key is a string encrypted by a customer master key and encoded in Base64. // Only available in client-side encryption ClientEncryptionKey *string `xml:"ClientEncryptionKey"` // The initial value that is randomly generated for data encryption. // The initial value is is a string encrypted by a customer master key and encoded in Base64. // Only available in client-side encryption ClientEncryptionStart *string `xml:"ClientEncryptionStart"` // The algorithm used to encrypt data. // Only available in client-side encryption ClientEncryptionCekAlg *string `xml:"ClientEncryptionCekAlg"` // The algorithm used to encrypt the data key. // Only available in client-side encryption ClientEncryptionWrapAlg *string `xml:"ClientEncryptionWrapAlg"` // The total size of the data to encrypt for multipart upload when init_multipart is called. // Only available in client-side encryption ClientEncryptionDataSize *int64 `xml:"ClientEncryptionDataSize"` // The size of each part to encrypt for multipart upload when init_multipart is called. // Only available in client-side encryption ClientEncryptionPartSize *int64 `xml:"ClientEncryptionPartSize"` Parts []Part `xml:"Part"` ResultCommon }
type ListStyleRequest ¶ added in v1.1.0
type ListStyleRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type ListStyleResult ¶ added in v1.1.0
type ListStyleResult struct { // The container that was used to query the information about image styles. StyleList *StyleList `output:"body,StyleList,xml"` ResultCommon }
type LocationRTCConstraint ¶ added in v1.1.0
type LocationRTCConstraint struct { // The regions where RTC is supported. Locations []string `xml:"Location"` }
type LocationTransferType ¶ added in v1.1.0
type LocationTransferType struct { // The regions in which the destination bucket can be located. Location *string `xml:"Location"` // The container that stores the transfer type. TransferTypes *TransferTypes `xml:"TransferTypes"` }
type LocationTransferTypeConstraint ¶ added in v1.1.0
type LocationTransferTypeConstraint struct { // The container that stores regions in which the destination bucket can be located with the TransferType information. LocationTransferTypes []LocationTransferType `xml:"LocationTransferType"` }
type LogPrinter ¶
type LogPrinter interface {
Print(...any)
}
A LogPrinter is a interface for the SDK to log messages to.
type LogPrinterFunc ¶
type LogPrinterFunc func(...any)
A LogPrinterFunc is a convenience type to wrap it so the LogPrinter interface can be used.
func (LogPrinterFunc) Print ¶
func (f LogPrinterFunc) Print(v ...any)
Print calls the wrapped function with the arguments provided
type Logger ¶
type Logger interface { Debugf(format string, v ...any) Infof(format string, v ...any) Warnf(format string, v ...any) Errorf(format string, v ...any) Level() int }
Logger interface to handle logging
type LoggingEnabled ¶ added in v1.1.0
type LoggingHeaderSet ¶ added in v1.1.0
type LoggingHeaderSet struct { // The list of the custom request headers. Headers []string `xml:"header"` }
type LoggingParamSet ¶ added in v1.1.0
type LoggingParamSet struct { // The list of the custom URL parameters. Parameters []string `xml:"parameter"` }
type MetaQuery ¶ added in v1.1.2
type MetaQuery struct { // The maximum number of objects to return. Valid values: 0 to 100. If this parameter is not set or is set to 0, up to 100 objects are returned. MaxResults *int64 `xml:"MaxResults"` // The query conditions. A query condition includes the following elements:* Operation: the operator. Valid values: eq (equal to), gt (greater than), gte (greater than or equal to), lt (less than), lte (less than or equal to), match (fuzzy query), prefix (prefix query), and (AND), or (OR), and not (NOT).* Field: the field name.* Value: the field value.* SubQueries: the subquery conditions. Options that are included in this element are the same as those of simple query. You need to set subquery conditions only when Operation is set to and, or, or not. Query *string `xml:"Query"` // The field based on which the results are sorted. Sort *string `xml:"Sort"` // The sort order. Order MetaQueryOrderType `xml:"Order"` // The container that stores the information about aggregate operations. Aggregations *MetaQueryAggregations `xml:"Aggregations"` // The pagination token used to obtain information in the next request. The object information is returned in alphabetical order starting from the value of NextToken. NextToken *string `xml:"NextToken"` }
type MetaQueryAggregation ¶ added in v1.1.2
type MetaQueryAggregations ¶ added in v1.1.2
type MetaQueryAggregations struct { // The container that stores the information about a single aggregate operation. Aggregations []MetaQueryAggregation `xml:"Aggregation"` }
type MetaQueryFile ¶ added in v1.1.2
type MetaQueryFile struct { // The time when the object was last modified. FileModifiedTime *string `xml:"FileModifiedTime"` // The type of the object.Valid values:* Multipart : The object is uploaded by using multipart upload .* Symlink : The object is a symbolic link that was created by calling the PutSymlink operation. * Appendable : The object is uploaded by using AppendObject .* Normal : The object is uploaded by using PutObject. OSSObjectType *string `xml:"OSSObjectType"` // The ETag of the object. ETag *string `xml:"ETag"` // The server-side encryption algorithm used when the object was created. ServerSideEncryptionCustomerAlgorithm *string `xml:"ServerSideEncryptionCustomerAlgorithm"` // The number of the tags of the object. OSSTaggingCount *int64 `xml:"OSSTaggingCount"` // The tags. OSSTagging []MetaQueryTagging `xml:"OSSTagging>Tagging"` // The user metadata items. OSSUserMeta []MetaQueryUserMeta `xml:"OSSUserMeta>UserMeta"` // The full path of the object. Filename *string `xml:"Filename"` // The storage class of the object.Valid values:* Archive : the Archive storage class .* ColdArchive : the Cold Archive storage class .* IA : the Infrequent Access (IA) storage class .* Standard : The Standard storage class . OSSStorageClass *string `xml:"OSSStorageClass"` // The access control list (ACL) of the object.Valid values:* default : the ACL of the bucket .* private : private .* public-read : public-read .* public-read-write : public-read-write . ObjectACL *string `xml:"ObjectACL"` // The CRC-64 value of the object. OSSCRC64 *string `xml:"OSSCRC64"` // The server-side encryption of the object. ServerSideEncryption *string `xml:"ServerSideEncryption"` // The object size. Size *int64 `xml:"Size"` }
type MetaQueryOrderType ¶ added in v1.1.2
type MetaQueryOrderType string
const ( MetaQueryOrderAsc MetaQueryOrderType = "asc" MetaQueryOrderDesc MetaQueryOrderType = "desc" )
Enum values for MetaQueryOrderType
type MetaQueryStatus ¶ added in v1.1.2
type MetaQueryStatus struct { // The time when the metadata index library was created. The value follows the RFC 3339 standard in the YYYY-MM-DDTHH:mm:ss+TIMEZONE format. YYYY-MM-DD indicates the year, month, and day. T indicates the beginning of the time element. HH:mm:ss indicates the hour, minute, and second. TIMEZONE indicates the time zone. CreateTime *string `xml:"CreateTime"` // The time when the metadata index library was updated. The value follows the RFC 3339 standard in the YYYY-MM-DDTHH:mm:ss+TIMEZONE format. YYYY-MM-DD indicates the year, month, and day. T indicates the beginning of the time element. HH:mm:ss indicates the hour, minute, and second. TIMEZONE indicates the time zone. UpdateTime *string `xml:"UpdateTime"` // The status of the metadata index library. Valid values:- Ready: The metadata index library is being prepared after it is created.In this case, the metadata index library cannot be used to query data.- Stop: The metadata index library is paused.- Running: The metadata index library is running.- Retrying: The metadata index library failed to be created and is being created again.- Failed: The metadata index library failed to be created.- Deleted: The metadata index library is deleted. State *string `xml:"State"` // The scan type. Valid values:- FullScanning: Full scanning is in progress.- IncrementalScanning: Incremental scanning is in progress. Phase *string `xml:"Phase"` }
type MetaQueryTagging ¶ added in v1.1.2
type MetaQueryUserMeta ¶ added in v1.1.2
type MirrorHeaders ¶ added in v1.1.0
type MirrorHeaders struct { // Specifies whether to pass through all request headers other than the following headers to the origin. This parameter takes effect only when the value of RedirectType is Mirror.* Headers such as content-length, authorization2, authorization, range, and date* Headers that start with oss-, x-oss-, and x-drs-Default value: false.Valid values:* true * false PassAll *bool `xml:"PassAll"` // The headers to pass through to the origin. This parameter takes effect only when the value of RedirectType is Mirror. Each specified header can be up to 1,024 bytes in length and can contain only letters, digits, and hyphens (-). You can specify up to 10 headers. Passs []string `xml:"Pass"` // The headers that are not allowed to pass through to the origin. This parameter takes effect only when the value of RedirectType is Mirror. Each header can be up to 1,024 bytes in length and can contain only letters, digits, and hyphens (-). You can specify up to 10 headers. This parameter is used together with PassAll. Removes []string `xml:"Remove"` // The headers that are sent to the origin. The specified headers are configured in the data returned by the origin regardless of whether the headers are contained in the request. This parameter takes effect only when the value of RedirectType is Mirror. You can specify up to 10 headers. Sets []MirrorHeadersSet `xml:"Set"` }
type MirrorHeadersSet ¶ added in v1.1.0
type MirrorHeadersSet struct { // The key of the header. The key can be up to 1,024 bytes in length and can contain only letters, digits, and hyphens (-). This parameter takes effect only when the value of RedirectType is Mirror. This parameter must be specified if Set is specified. Key *string `xml:"Key"` // The value of the header. The value can be up to 1,024 bytes in length and cannot contain `\r\n`. This parameter takes effect only when the value of RedirectType is Mirror. This parameter must be specified if Set is specified. Value *string `xml:"Value"` }
type MultiBytesReader ¶
type MultiBytesReader struct {
// contains filtered or unexported fields
}
MultiBytesReader A Reader implements the io.Reader, io.Seeker interfaces by reading from multi byte slice.
func NewMultiBytesReader ¶
func NewMultiBytesReader(b [][]byte) *MultiBytesReader
NewReader returns a new Reader reading from b.
func (*MultiBytesReader) Len ¶
func (r *MultiBytesReader) Len() int
Len returns the number of bytes of the unread portion of the slice.
func (*MultiBytesReader) Read ¶
func (r *MultiBytesReader) Read(b []byte) (n int, err error)
Read implements the io.Reader interface.
func (*MultiBytesReader) Reset ¶
func (r *MultiBytesReader) Reset(b [][]byte)
Reset resets the Reader to be reading from b.
func (*MultiBytesReader) Seek ¶
func (r *MultiBytesReader) Seek(offset int64, whence int) (int64, error)
Seek implements the io.Seeker interface.
func (*MultiBytesReader) Size ¶
func (r *MultiBytesReader) Size() int64
Size returns the original length of the underlying byte slice.
type NoncurrentVersionExpiration ¶ added in v1.1.0
type NoncurrentVersionExpiration struct { // The number of days from when the objects became previous versions to when the lifecycle rule takes effect. NoncurrentDays *int32 `xml:"NoncurrentDays"` }
type NoncurrentVersionTransition ¶ added in v1.1.0
type NoncurrentVersionTransition struct { // Specifies whether the lifecycle rule applies to objects based on their last access time. Valid values:* true: The rule applies to objects based on their last access time.* false: The rule applies to objects based on their last modified time. IsAccessTime *bool `xml:"IsAccessTime"` // Specifies whether to convert the storage class of non-Standard objects back to Standard after the objects are accessed. This parameter takes effect only when the IsAccessTime parameter is set to true. Valid values:* true: converts the storage class of the objects to Standard.* false: does not convert the storage class of the objects to Standard. ReturnToStdWhenVisit *bool `xml:"ReturnToStdWhenVisit"` // Specifies whether to convert the storage class of objects whose sizes are less than 64 KB to IA, Archive, or Cold Archive based on their last access time. Valid values:* true: converts the storage class of objects that are smaller than 64 KB to IA, Archive, or Cold Archive. Objects that are smaller than 64 KB are charged as 64 KB. Objects that are greater than or equal to 64 KB are charged based on their actual sizes. If you set this parameter to true, the storage fees may increase.* false: does not convert the storage class of an object that is smaller than 64 KB. AllowSmallFile *bool `xml:"AllowSmallFile"` // The number of days from when the objects became previous versions to when the lifecycle rule takes effect. NoncurrentDays *int32 `xml:"NoncurrentDays"` // The storage class to which objects are converted. Valid values:* IA* Archive* ColdArchive You can convert the storage class of objects in an IA bucket to only Archive or Cold Archive. StorageClass StorageClassType `xml:"StorageClass"` }
type ObjectACLType ¶
type ObjectACLType string
ObjectACLType The access control list (ACL) of the object
const ( // ObjectACLPrivate Only the object owner is allowed to perform read and write operations on the object. // Other users cannot access the object. ObjectACLPrivate ObjectACLType = "private" // ObjectACLPublicRead Only the object owner can write data to the object. // Other users, including anonymous users, can only read the object. ObjectACLPublicRead ObjectACLType = "public-read" // ObjectACLPublicReadWrite All users, including anonymous users, can perform read and write operations on the object. ObjectACLPublicReadWrite ObjectACLType = "public-read-write" // ObjectACLDefault The ACL of the object is the same as that of the bucket in which the object is stored. ObjectACLDefault ObjectACLType = "default" )
Enum values for ObjectACLType
type ObjectDeleteMarkerProperties ¶
type ObjectDeleteMarkerProperties struct { // The name of the object. Key *string `xml:"Key"` // The version ID of the object. VersionId *string `xml:"VersionId"` // Indicates whether the version is the current version. IsLatest bool `xml:"IsLatest"` // The time when the returned objects were last modified. LastModified *time.Time `xml:"LastModified"` // The container that stores information about the bucket owner. Owner *Owner `xml:"Owner"` }
type ObjectMixProperties ¶
type ObjectMixProperties ObjectVersionProperties
func (ObjectMixProperties) IsDeleteMarker ¶
func (m ObjectMixProperties) IsDeleteMarker() bool
type ObjectProperties ¶
type ObjectProperties struct { // The name of the object. Key *string `xml:"Key"` // The type of the object. Valid values: Normal, Multipart and Appendable Type *string `xml:"Type"` // The size of the returned object. Unit: bytes. Size int64 `xml:"Size"` // The entity tag (ETag). An ETag is created when an object is created to identify the content of the object. ETag *string `xml:"ETag"` // The time when the returned objects were last modified. LastModified *time.Time `xml:"LastModified"` // The storage class of the object. StorageClass *string `xml:"StorageClass"` // The container that stores information about the bucket owner. Owner *Owner `xml:"Owner"` // The restoration status of the object. RestoreInfo *string `xml:"RestoreInfo"` }
type ObjectVersionProperties ¶
type ObjectVersionProperties struct { // The name of the object. Key *string `xml:"Key"` // The version ID of the object. VersionId *string `xml:"VersionId"` // Indicates whether the version is the current version. IsLatest bool `xml:"IsLatest"` // The time when the returned objects were last modified. LastModified *time.Time `xml:"LastModified"` // The type of the returned object. Type *string `xml:"Type"` // The size of the returned object. Unit: bytes. Size int64 `xml:"Size"` // The entity tag (ETag) that is generated when an object is created. ETags are used to identify the content of objects. ETag *string `xml:"ETag"` // The storage class of the object. StorageClass *string `xml:"StorageClass"` // The container that stores information about the bucket owner. Owner *Owner `xml:"Owner"` // The restoration status of the object. RestoreInfo *string `xml:"RestoreInfo"` }
type OpenFileAPIClient ¶
type OpenFileAPIClient interface { HeadObject(ctx context.Context, request *HeadObjectRequest, optFns ...func(*Options)) (*HeadObjectResult, error) GetObject(ctx context.Context, request *GetObjectRequest, optFns ...func(*Options)) (*GetObjectResult, error) }
type OpenMetaQueryRequest ¶ added in v1.1.2
type OpenMetaQueryRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` RequestCommon }
type OpenMetaQueryResult ¶ added in v1.1.2
type OpenMetaQueryResult struct {
ResultCommon
}
type OpenOptions ¶
type OperationError ¶
type OperationError struct {
// contains filtered or unexported fields
}
func (*OperationError) Error ¶
func (e *OperationError) Error() string
func (*OperationError) Operation ¶
func (e *OperationError) Operation() string
func (*OperationError) Unwrap ¶
func (e *OperationError) Unwrap() error
type OperationInput ¶
type OperationMetadata ¶
type OperationMetadata struct {
// contains filtered or unexported fields
}
func (*OperationMetadata) Add ¶
func (m *OperationMetadata) Add(key, value any)
func (OperationMetadata) Clone ¶
func (m OperationMetadata) Clone() OperationMetadata
func (OperationMetadata) Get ¶
func (m OperationMetadata) Get(key any) any
func (OperationMetadata) Has ¶
func (m OperationMetadata) Has(key any) bool
func (*OperationMetadata) Set ¶
func (m *OperationMetadata) Set(key, value any)
func (OperationMetadata) Values ¶
func (m OperationMetadata) Values(key any) []any
type OperationOutput ¶
type OperationOutput struct { Input *OperationInput Status string StatusCode int Headers http.Header Body io.ReadCloser OpMetadata OperationMetadata // contains filtered or unexported fields }
type OptionObjectRequest ¶ added in v1.1.0
type OptionObjectRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The full path of the object. Key *string `input:"path,key,required"` // The origin of the request. It is used to identify a cross-origin request. You can specify only one Origin header in a cross-origin request. By default, this header is left empty. Origin *string `input:"header,Origin,required"` // The method to be used in the actual cross-origin request. You can specify only one Access-Control-Request-Method header in a cross-origin request. By default, this header is left empty. AccessControlRequestMethod *string `input:"header,Access-Control-Request-Method,required"` // The custom headers to be sent in the actual cross-origin request. You can configure multiple custom headers in a cross-origin request. Custom headers are separated by commas (,). By default, this header is left empty. AccessControlRequestHeaders *string `input:"header,Access-Control-Request-Headers"` RequestCommon }
type OptionObjectResult ¶ added in v1.1.0
type OptionObjectResult struct { // The HTTP method of the request. If the request is denied, the response does not contain the header. AccessControlAllowMethods *string `output:"header,Access-Control-Allow-Methods"` // The list of headers included in the request. If the request includes headers that are not allowed, the response does not contain the headers and the request is denied. AccessControlAllowHeaders *string `output:"header,Access-Control-Allow-Headers"` // The list of headers that can be accessed by JavaScript applications on a client. AccessControlExposeHeaders *string `output:"header,Access-Control-Expose-Headers"` // The maximum duration for the browser to cache preflight results. Unit: seconds. AccessControlMaxAge *int64 `output:"header,Access-Control-Max-Age"` // The origin that is included in the request. If the request is denied, the response does not contain the header. AccessControlAllowOrigin *string `output:"header,Access-Control-Allow-Origin"` ResultCommon }
type OptionalFields ¶ added in v1.1.0
type OptionalFields struct { // The configuration fields that are included in inventory lists. Available configuration fields:* Size: the size of the object.* LastModifiedDate: the time when the object was last modified.* ETag: the ETag of the object. It is used to identify the content of the object.* StorageClass: the storage class of the object.* IsMultipartUploaded: specifies whether the object is uploaded by using multipart upload.* EncryptionStatus: the encryption status of the object. Fields []InventoryOptionalFieldType `xml:"Field"` }
type Options ¶
type Options struct { Product string Region string Endpoint *url.URL RetryMaxAttempts *int Retryer retry.Retryer Signer signer.Signer CredentialsProvider credentials.CredentialsProvider HttpClient HTTPClient ResponseHandlers []func(*http.Response) error UrlStyle UrlStyleType FeatureFlags FeatureFlagsType OpReadWriteTimeout *time.Duration AuthMethod *AuthMethodType AdditionalHeaders []string }
type OutputSerializationSelect ¶
type OutputSerializationSelect struct { CsvBodyOutput *CSVSelectOutput `xml:"CSV"` JsonBodyOutput *JSONSelectOutput `xml:"JSON"` OutputRawData *bool `xml:"OutputRawData"` KeepAllColumns *bool `xml:"KeepAllColumns"` EnablePayloadCrc *bool `xml:"EnablePayloadCrc"` OutputHeader *bool `xml:"OutputHeader"` }
type PaginatorOptions ¶
type PaginatorOptions struct { // The maximum number of items in the response. Limit int32 }
type Part ¶
type Part struct { // The number that identifies a part. PartNumber int32 `xml:"PartNumber"` // The ETag value of the content of the uploaded part. ETag *string `xml:"ETag"` // The time when the part was uploaded. LastModified *time.Time `xml:"LastModified"` // The size of the uploaded parts. Size int64 `xml:"Size"` // The 64-bit CRC value of the object. // This value is calculated based on the ECMA-182 standard. HashCRC64 *string `xml:"HashCrc64ecma"` }
type PolicyStatus ¶ added in v1.1.0
type PolicyStatus struct { // Indicates whether the current bucket policy allows public access.true false IsPublic *bool `xml:"IsPublic"` }
type PresignOptions ¶
type PresignResult ¶
type ProcessObjectRequest ¶
type ProcessObjectRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // Image processing parameters Process *string `input:"x-oss-process,nop,required"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type ProcessObjectResult ¶
type ProcessObjectResult struct { Bucket string `json:"bucket"` FileSize int `json:"fileSize"` Object string `json:"object"` ProcessStatus string `json:"status"` ResultCommon }
type ProgressFunc ¶
type ProgressFunc func(increment, transferred, total int64)
type PublicAccessBlockConfiguration ¶ added in v1.1.0
type PublicAccessBlockConfiguration struct { // Specifies whether to enable Block Public Access.true: enables Block Public Access.false (default): disables Block Public Access. BlockPublicAccess *bool `xml:"BlockPublicAccess"` }
type PutAccessPointPolicyRequest ¶ added in v1.1.2
type PutAccessPointPolicyRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the access point. AccessPointName *string `input:"header,x-oss-access-point-name,required"` // The configurations of the access point policy. Body io.Reader `input:"body,nop,required"` RequestCommon }
type PutAccessPointPolicyResult ¶ added in v1.1.2
type PutAccessPointPolicyResult struct {
ResultCommon
}
type PutAccessPointPublicAccessBlockRequest ¶ added in v1.1.2
type PutAccessPointPublicAccessBlockRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the access point. AccessPointName *string `input:"query,x-oss-access-point-name,required"` // The request body. PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `input:"body,PublicAccessBlockConfiguration,xml,required"` RequestCommon }
type PutAccessPointPublicAccessBlockResult ¶ added in v1.1.2
type PutAccessPointPublicAccessBlockResult struct {
ResultCommon
}
type PutBucketAccessMonitorRequest ¶ added in v1.1.0
type PutBucketAccessMonitorRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The request body schema. AccessMonitorConfiguration *AccessMonitorConfiguration `input:"body,AccessMonitorConfiguration,xml,required"` RequestCommon }
type PutBucketAccessMonitorResult ¶ added in v1.1.0
type PutBucketAccessMonitorResult struct {
ResultCommon
}
type PutBucketAclRequest ¶
type PutBucketAclRequest struct { // The name of the bucket containing the objects Bucket *string `input:"host,bucket,required"` // The access control list (ACL) of the object. Acl BucketACLType `input:"header,x-oss-acl,required"` RequestCommon }
type PutBucketAclResult ¶
type PutBucketAclResult struct {
ResultCommon
}
type PutBucketArchiveDirectReadRequest ¶ added in v1.1.0
type PutBucketArchiveDirectReadRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The request body. ArchiveDirectReadConfiguration *ArchiveDirectReadConfiguration `input:"body,ArchiveDirectReadConfiguration,xml,required"` RequestCommon }
type PutBucketArchiveDirectReadResult ¶ added in v1.1.0
type PutBucketArchiveDirectReadResult struct {
ResultCommon
}
type PutBucketCorsRequest ¶ added in v1.1.0
type PutBucketCorsRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The request body schema. CORSConfiguration *CORSConfiguration `input:"body,CORSConfiguration,xml,required"` RequestCommon }
type PutBucketCorsResult ¶ added in v1.1.0
type PutBucketCorsResult struct {
ResultCommon
}
type PutBucketEncryptionRequest ¶ added in v1.1.0
type PutBucketEncryptionRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The request body schema. ServerSideEncryptionRule *ServerSideEncryptionRule `input:"body,ServerSideEncryptionRule,xml,required"` RequestCommon }
type PutBucketEncryptionResult ¶ added in v1.1.0
type PutBucketEncryptionResult struct {
ResultCommon
}
type PutBucketHttpsConfigRequest ¶ added in v1.1.0
type PutBucketHttpsConfigRequest struct { // This name of the bucket. Bucket *string `input:"host,bucket,required"` // The request body schema. HttpsConfiguration *HttpsConfiguration `input:"body,HttpsConfiguration,xml,required"` RequestCommon }
type PutBucketHttpsConfigResult ¶ added in v1.1.0
type PutBucketHttpsConfigResult struct {
ResultCommon
}
type PutBucketInventoryRequest ¶ added in v1.1.0
type PutBucketInventoryRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the inventory. InventoryId *string `input:"query,inventoryId,required"` // Request body schema. InventoryConfiguration *InventoryConfiguration `input:"body,InventoryConfiguration,xml,required"` RequestCommon }
type PutBucketInventoryResult ¶ added in v1.1.0
type PutBucketInventoryResult struct {
ResultCommon
}
type PutBucketLifecycleRequest ¶ added in v1.1.0
type PutBucketLifecycleRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // Specifies whether to allow overlapped prefixes. Valid values:true: Overlapped prefixes are allowed.false: Overlapped prefixes are not allowed. AllowSameActionOverlap *string `input:"header,x-oss-allow-same-action-overlap"` // The container of the request body. LifecycleConfiguration *LifecycleConfiguration `input:"body,LifecycleConfiguration,xml,required"` RequestCommon }
type PutBucketLifecycleResult ¶ added in v1.1.0
type PutBucketLifecycleResult struct {
ResultCommon
}
type PutBucketLoggingRequest ¶ added in v1.1.0
type PutBucketLoggingRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The request body schema. BucketLoggingStatus *BucketLoggingStatus `input:"body,BucketLoggingStatus,xml,required"` RequestCommon }
type PutBucketLoggingResult ¶ added in v1.1.0
type PutBucketLoggingResult struct {
ResultCommon
}
type PutBucketPolicyRequest ¶ added in v1.1.0
type PutBucketPolicyRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The request parameters. Body io.Reader `input:"body,nop,required"` RequestCommon }
type PutBucketPolicyResult ¶ added in v1.1.0
type PutBucketPolicyResult struct {
ResultCommon
}
type PutBucketPublicAccessBlockRequest ¶ added in v1.1.0
type PutBucketPublicAccessBlockRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // Request body. PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `input:"body,PublicAccessBlockConfiguration,xml,required"` RequestCommon }
type PutBucketPublicAccessBlockResult ¶ added in v1.1.0
type PutBucketPublicAccessBlockResult struct {
ResultCommon
}
type PutBucketRefererRequest ¶ added in v1.1.0
type PutBucketRefererRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The request body schema. RefererConfiguration *RefererConfiguration `input:"body,RefererConfiguration,xml,required"` RequestCommon }
type PutBucketRefererResult ¶ added in v1.1.0
type PutBucketRefererResult struct {
ResultCommon
}
type PutBucketReplicationRequest ¶ added in v1.1.0
type PutBucketReplicationRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The container of the request body. ReplicationConfiguration *ReplicationConfiguration `input:"body,ReplicationConfiguration,xml,required"` RequestCommon }
type PutBucketReplicationResult ¶ added in v1.1.0
type PutBucketReplicationResult struct { ReplicationRuleId *string `output:"header,x-oss-replication-rule-id"` ResultCommon }
type PutBucketRequest ¶
type PutBucketRequest struct { // The name of the bucket to create. Bucket *string `input:"host,bucket,required"` // The access control list (ACL) of the bucket. Acl BucketACLType `input:"header,x-oss-acl"` // The ID of the resource group. ResourceGroupId *string `input:"header,x-oss-resource-group-id"` // The configuration information for the bucket. CreateBucketConfiguration *CreateBucketConfiguration `input:"body,CreateBucketConfiguration,xml"` RequestCommon }
type PutBucketRequestPaymentRequest ¶
type PutBucketRequestPaymentRequest struct { // The name of the bucket containing the objects Bucket *string `input:"host,bucket,required"` // The request payment configuration information for the bucket. PaymentConfiguration *RequestPaymentConfiguration `input:"body,RequestPaymentConfiguration,xml,required"` RequestCommon }
type PutBucketRequestPaymentResult ¶
type PutBucketRequestPaymentResult struct {
ResultCommon
}
type PutBucketResourceGroupRequest ¶ added in v1.1.0
type PutBucketResourceGroupRequest struct { // The bucket for which you want to modify the ID of the resource group. Bucket *string `input:"host,bucket,required"` // The request body schema. BucketResourceGroupConfiguration *BucketResourceGroupConfiguration `input:"body,BucketResourceGroupConfiguration,xml,required"` RequestCommon }
type PutBucketResourceGroupResult ¶ added in v1.1.0
type PutBucketResourceGroupResult struct {
ResultCommon
}
type PutBucketResult ¶
type PutBucketResult struct {
ResultCommon
}
type PutBucketRtcRequest ¶ added in v1.1.0
type PutBucketRtcRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The container of the request body. RtcConfiguration *RtcConfiguration `input:"body,ReplicationRule,xml,required"` RequestCommon }
type PutBucketRtcResult ¶ added in v1.1.0
type PutBucketRtcResult struct {
ResultCommon
}
type PutBucketTagsRequest ¶ added in v1.1.0
type PutBucketTagsRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The request body schema. Tagging *Tagging `input:"body,Tagging,xml,required"` RequestCommon }
type PutBucketTagsResult ¶ added in v1.1.0
type PutBucketTagsResult struct {
ResultCommon
}
type PutBucketTransferAccelerationRequest ¶ added in v1.1.0
type PutBucketTransferAccelerationRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The container of the request body. TransferAccelerationConfiguration *TransferAccelerationConfiguration `input:"body,TransferAccelerationConfiguration,xml,required"` RequestCommon }
type PutBucketTransferAccelerationResult ¶ added in v1.1.0
type PutBucketTransferAccelerationResult struct {
ResultCommon
}
type PutBucketVersioningRequest ¶
type PutBucketVersioningRequest struct { // The name of the bucket containing the objects Bucket *string `input:"host,bucket,required"` VersioningConfiguration *VersioningConfiguration `input:"body,VersioningConfiguration,xml,required"` RequestCommon }
type PutBucketVersioningResult ¶
type PutBucketVersioningResult struct {
ResultCommon
}
type PutBucketWebsiteRequest ¶ added in v1.1.0
type PutBucketWebsiteRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The request body schema. WebsiteConfiguration *WebsiteConfiguration `input:"body,WebsiteConfiguration,xml,required"` RequestCommon }
type PutBucketWebsiteResult ¶ added in v1.1.0
type PutBucketWebsiteResult struct {
ResultCommon
}
type PutCnameRequest ¶ added in v1.1.1
type PutCnameRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The request body schema. BucketCnameConfiguration *BucketCnameConfiguration `input:"body,BucketCnameConfiguration,xml,required"` RequestCommon }
type PutCnameResult ¶ added in v1.1.1
type PutCnameResult struct {
ResultCommon
}
type PutObjectAclRequest ¶
type PutObjectAclRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // The access control list (ACL) of the object. Acl ObjectACLType `input:"header,x-oss-object-acl,required"` // The version ID of the source object. VersionId *string `input:"query,versionId"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type PutObjectAclResult ¶
type PutObjectAclResult struct { // Version of the object. VersionId *string `output:"header,x-oss-version-id"` ResultCommon }
type PutObjectRequest ¶
type PutObjectRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // The caching behavior of the web page when the object is downloaded. CacheControl *string `input:"header,Cache-Control"` // The method that is used to access the object. ContentDisposition *string `input:"header,Content-Disposition"` // The method that is used to encode the object. ContentEncoding *string `input:"header,Content-Encoding"` // The size of the data in the HTTP message body. Unit: bytes. ContentLength *int64 `input:"header,Content-Length"` // The MD5 hash of the object that you want to upload. ContentMD5 *string `input:"header,Content-MD5"` // A standard MIME type describing the format of the contents. ContentType *string `input:"header,Content-Type"` // The expiration time of the cache in UTC. Expires *string `input:"header,Expires"` // Specifies whether the object that is uploaded by calling the PutObject operation // overwrites an existing object that has the same name. Valid values: true and false ForbidOverwrite *string `input:"header,x-oss-forbid-overwrite"` // The encryption method on the server side when an object is created. // Valid values: AES256 and KMS ServerSideEncryption *string `input:"header,x-oss-server-side-encryption"` // The ID of the customer master key (CMK) that is managed by Key Management Service (KMS). // This header is valid only when the x-oss-server-side-encryption header is set to KMS. ServerSideDataEncryption *string `input:"header,x-oss-server-side-data-encryption"` // The ID of the customer master key (CMK) that is managed by Key Management Service (KMS). SSEKMSKeyId *string `input:"header,x-oss-server-side-encryption-key-id"` // The access control list (ACL) of the object. Acl ObjectACLType `input:"header,x-oss-object-acl"` // The storage class of the object. StorageClass StorageClassType `input:"header,x-oss-storage-class"` // The metadata of the object that you want to upload. Metadata map[string]string `input:"header,x-oss-meta-,usermeta"` // The tags that are specified for the object by using a key-value pair. // You can specify multiple tags for an object. Example: TagA=A&TagB=B. Tagging *string `input:"header,x-oss-tagging"` // A callback parameter is a Base64-encoded string that contains multiple fields in the JSON format. Callback *string `input:"header,x-oss-callback"` // Configure custom parameters by using the callback-var parameter. CallbackVar *string `input:"header,x-oss-callback-var"` // Specify the speed limit value. The speed limit value ranges from 245760 to 838860800, with a unit of bit/s. TrafficLimit int64 `input:"header,x-oss-traffic-limit"` // Object data. Body io.Reader `input:"body,nop"` // Progress callback function ProgressFn ProgressFunc // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type PutObjectResult ¶
type PutObjectResult struct { // Content-Md5 for the uploaded object. ContentMD5 *string `output:"header,Content-MD5"` // Entity tag for the uploaded object. ETag *string `output:"header,ETag"` // The 64-bit CRC value of the object. // This value is calculated based on the ECMA-182 standard. HashCRC64 *string `output:"header,x-oss-hash-crc64ecma"` // Version of the object. VersionId *string `output:"header,x-oss-version-id"` CallbackResult map[string]any ResultCommon }
type PutObjectTaggingRequest ¶
type PutObjectTaggingRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // Version of the object. VersionId *string `input:"query,versionId"` Tagging *Tagging `input:"body,Tagging,xml,required"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type PutObjectTaggingResult ¶
type PutObjectTaggingResult struct { // Version of the object. VersionId *string `output:"header,x-oss-version-id"` ResultCommon }
type PutPublicAccessBlockRequest ¶ added in v1.1.0
type PutPublicAccessBlockRequest struct { // Request body. PublicAccessBlockConfiguration *PublicAccessBlockConfiguration `input:"body,PublicAccessBlockConfiguration,xml,required"` RequestCommon }
type PutPublicAccessBlockResult ¶ added in v1.1.0
type PutPublicAccessBlockResult struct {
ResultCommon
}
type PutStyleRequest ¶ added in v1.1.0
type PutStyleRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the image style. StyleName *string `input:"query,styleName,required"` // The category of the style. Category *string `input:"query,category"` // The container that stores the content information about the image style. Style *StyleContent `input:"body,Style,xml,required"` RequestCommon }
type PutStyleResult ¶ added in v1.1.0
type PutStyleResult struct {
ResultCommon
}
type PutSymlinkRequest ¶
type PutSymlinkRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // The destination object to which the symbolic link points. Target *string `input:"header,x-oss-symlink-target,required"` // Specifies whether the object that is uploaded by calling the PutObject operation // overwrites an existing object that has the same name. Valid values: true and false ForbidOverwrite *string `input:"header,x-oss-forbid-overwrite"` // The ACL of the object. Default value: default. Acl ObjectACLType `input:"header,x-oss-object-acl"` // The storage class of the object. StorageClass StorageClassType `input:"header,x-oss-storage-class"` // The metadata of the object that you want to symlink. Metadata map[string]string `input:"header,x-oss-meta-,usermeta"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type PutSymlinkResult ¶
type PutSymlinkResult struct { // Version of the object. VersionId *string `output:"header,x-oss-version-id"` ResultCommon }
type PutUserDefinedLogFieldsConfigRequest ¶ added in v1.1.0
type PutUserDefinedLogFieldsConfigRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The container that stores the specified log configurations. UserDefinedLogFieldsConfiguration *UserDefinedLogFieldsConfiguration `input:"body,UserDefinedLogFieldsConfiguration,xml,required"` RequestCommon }
type PutUserDefinedLogFieldsConfigResult ¶ added in v1.1.0
type PutUserDefinedLogFieldsConfigResult struct {
ResultCommon
}
type RangeReader ¶
type RangeReader struct {
// contains filtered or unexported fields
}
func NewRangeReader ¶
func NewRangeReader(ctx context.Context, rangeGet ReaderRangeGetFn, httpRange *HTTPRange, etag string) (*RangeReader, error)
NewRangeReader returns a reader that will read from the Reader returued by getter from the given offset. The etag is used to identify the content of the object. If not set, the first ETag returned value will be used instead.
func (*RangeReader) Close ¶
func (r *RangeReader) Close() (err error)
func (*RangeReader) Offset ¶
func (r *RangeReader) Offset() int64
type ReadFlagInfo ¶
type ReadOnlyFile ¶
type ReadOnlyFile struct {
// contains filtered or unexported fields
}
func NewReadOnlyFile ¶
func NewReadOnlyFile(ctx context.Context, c OpenFileAPIClient, bucket string, key string, optFns ...func(*OpenOptions)) (*ReadOnlyFile, error)
NewReadOnlyFile OpenFile opens the named file for reading. If successful, methods on the returned file can be used for reading.
func (*ReadOnlyFile) Read ¶
func (f *ReadOnlyFile) Read(p []byte) (bytesRead int, err error)
Read reads up to len(b) bytes from the File and stores them in b. It returns the number of bytes read and any error encountered. At end of file, Read returns 0, io.EOF.
func (*ReadOnlyFile) Seek ¶
func (f *ReadOnlyFile) Seek(offset int64, whence int) (int64, error)
Seek sets the offset for the next Read or Write on file to offset, interpreted according to whence: 0 means relative to the origin of the file, 1 means relative to the current offset, and 2 means relative to the end. It returns the new offset and an error.
type ReadSeekerNopClose ¶
type ReadSeekerNopClose struct {
// contains filtered or unexported fields
}
func ReadSeekNopCloser ¶
func ReadSeekNopCloser(r io.Reader) ReadSeekerNopClose
func (ReadSeekerNopClose) Close ¶
func (r ReadSeekerNopClose) Close() error
func (ReadSeekerNopClose) GetLen ¶
func (r ReadSeekerNopClose) GetLen() (int64, error)
func (ReadSeekerNopClose) HasLen ¶
func (r ReadSeekerNopClose) HasLen() (int, bool)
func (ReadSeekerNopClose) IsSeeker ¶
func (r ReadSeekerNopClose) IsSeeker() bool
type ReaderRangeGetFn ¶
type ReaderRangeGetFn func(context.Context, HTTPRange) (output *ReaderRangeGetOutput, err error)
type ReaderRangeGetOutput ¶
type ReaderWrapper ¶
type ReaderWrapper struct { Body io.ReadCloser Version byte FrameType int32 PayloadLength int32 HeaderCheckSum uint32 Offset uint64 Data string ClientCRC32 uint32 ServerCRC32 uint32 WriterForCheckCrc32 hash.Hash32 HTTPStatusCode int32 TotalScanned int64 Status int32 SplitsCount int32 RowsCount int64 ColumnsCount int32 ErrorMsg string PayloadChecksum uint32 ReadFlagInfo Finish bool }
ReaderWrapper defines HTTP response from OSS SelectObject
type RefererBlacklist ¶ added in v1.1.0
type RefererBlacklist struct { // The addresses in the Referer blacklist. Referers []string `xml:"Referer"` }
type RefererConfiguration ¶ added in v1.1.0
type RefererConfiguration struct { // Specifies whether to allow a request whose Referer field is empty. Valid values:* true (default)* false AllowEmptyReferer *bool `xml:"AllowEmptyReferer"` // Specifies whether to truncate the query string in the URL when the Referer is matched. Valid values:* true (default)* false AllowTruncateQueryString *bool `xml:"AllowTruncateQueryString"` // Specifies whether to truncate the path and parts that follow the path in the URL when the Referer is matched. Valid values:* true* false TruncatePath *bool `xml:"TruncatePath"` // The container that stores the Referer whitelist. ****The PutBucketReferer operation overwrites the existing Referer whitelist with the Referer whitelist specified in RefererList. If RefererList is not specified in the request, which specifies that no Referer elements are included, the operation clears the existing Referer whitelist. RefererList *RefererList `xml:"RefererList"` // The container that stores the Referer blacklist. RefererBlacklist *RefererBlacklist `xml:"RefererBlacklist"` }
type RefererList ¶ added in v1.1.0
type RefererList struct { // The addresses in the Referer whitelist. Referers []string `xml:"Referer"` }
type ReplicationConfiguration ¶ added in v1.1.0
type ReplicationConfiguration struct { // The container that stores the data replication rules. Rules []ReplicationRule `xml:"Rule"` }
type ReplicationDestination ¶ added in v1.1.0
type ReplicationDestination struct { // The destination bucket to which data is replicated. Bucket *string `xml:"Bucket"` // The region in which the destination bucket is located. Location *string `xml:"Location"` // The link that is used to transfer data during data replication. Valid values:* internal (default): the default data transfer link used in OSS.* oss_acc: the transfer acceleration link. You can set TransferType to oss_acc only when you create CRR rules. TransferType TransferTypeType `xml:"TransferType"` }
type ReplicationEncryptionConfiguration ¶ added in v1.1.0
type ReplicationEncryptionConfiguration struct {
ReplicaKmsKeyID *string `xml:"ReplicaKmsKeyID"`
}
type ReplicationLocation ¶ added in v1.1.0
type ReplicationLocation struct { // The regions in which the destination bucket can be located. Locations []string `xml:"Location"` // The container that stores regions in which the destination bucket can be located with TransferType specified. LocationTransferTypeConstraint *LocationTransferTypeConstraint `xml:"LocationTransferTypeConstraint"` // The container that stores regions in which the RTC can be enabled. LocationRTCConstraint *LocationRTCConstraint `xml:"LocationRTCConstraint"` }
type ReplicationPrefixSet ¶ added in v1.1.0
type ReplicationPrefixSet struct { // The prefix that is used to specify the object that you want to replicate. Only objects whose names contain the specified prefix are replicated to the destination bucket.* The value of the Prefix parameter can be up to 1,023 characters in length.* If you specify the Prefix parameter in a data replication rule, OSS synchronizes new data and historical data based on the value of the Prefix parameter. Prefixs []string `xml:"Prefix"` }
type ReplicationProgress ¶ added in v1.1.0
type ReplicationProgress struct { // The container that stores the progress of the data replication task corresponding to each data replication rule. Rules []ReplicationProgressRule `xml:"Rule"` }
type ReplicationProgressInformation ¶ added in v1.1.0
type ReplicationProgressInformation struct { // The percentage of the replicated historical data. This parameter is valid only when HistoricalObjectReplication is set to enabled. HistoricalObject *string `xml:"HistoricalObject"` // The time used to determine whether data is replicated to the destination bucket. Data that is written to the source bucket before the time is replicated to the destination bucket. The value of this parameter is in the GMT format. Example: Thu, 24 Sep 2015 15:39:18 GMT. NewObject *string `xml:"NewObject"` }
type ReplicationProgressRule ¶ added in v1.1.0
type ReplicationProgressRule struct { // The container that stores the information about the destination bucket. Destination *ReplicationDestination `xml:"Destination"` // The status of the data replication task. Valid values:* starting: OSS creates a data replication task after a data replication rule is configured.* doing: The replication rule is effective and the replication task is in progress.* closing: OSS clears a data replication task after the corresponding data replication rule is deleted. Status *string `xml:"Status"` // Specifies whether to replicate historical data that exists before data replication is enabled from the source bucket to the destination bucket.* enabled (default): replicates historical data to the destination bucket.* disabled: ignores historical data and replicates only data uploaded to the source bucket after data replication is enabled for the source bucket. HistoricalObjectReplication *string `xml:"HistoricalObjectReplication"` // The container that stores the progress of the data replication task. This parameter is returned only when the data replication task is in the doing state. Progress *ReplicationProgressInformation `xml:"Progress"` // The ID of the data replication rule. ID *string `xml:"ID"` // The container that stores prefixes. You can specify up to 10 prefixes in each data replication rule. PrefixSet *ReplicationPrefixSet `xml:"PrefixSet"` // The operations that are synchronized to the destination bucket.* ALL: PUT, DELETE, and ABORT operations are synchronized to the destination bucket.* PUT: Write operations are synchronized to the destination bucket, including PutObject, PostObject, AppendObject, CopyObject, PutObjectACL, InitiateMultipartUpload, UploadPart, UploadPartCopy, and CompleteMultipartUpload. Action *string `xml:"Action"` }
type ReplicationRule ¶ added in v1.1.0
type ReplicationRule struct { // The container that stores the information about the destination bucket. Destination *ReplicationDestination `xml:"Destination"` // The role that you want to authorize OSS to use to replicate data. If you want to use SSE-KMS to encrypt the objects that are replicated to the destination bucket, you must specify this parameter. SyncRole *string `xml:"SyncRole"` // The container that specifies other conditions used to filter the source objects that you want to replicate. Filter conditions can be specified only for source objects encrypted by using SSE-KMS. SourceSelectionCriteria *ReplicationSourceSelectionCriteria `xml:"SourceSelectionCriteria"` // The encryption configuration for the objects replicated to the destination bucket. If the Status parameter is set to Enabled, you must specify this parameter. EncryptionConfiguration *ReplicationEncryptionConfiguration `xml:"EncryptionConfiguration"` // Specifies whether to replicate historical data that exists before data replication is enabled from the source bucket to the destination bucket. Valid values:* enabled (default): replicates historical data to the destination bucket.* disabled: does not replicate historical data to the destination bucket. Only data uploaded to the source bucket after data replication is enabled for the source bucket is replicated. HistoricalObjectReplication HistoricalObjectReplicationType `xml:"HistoricalObjectReplication"` // The container that stores the status of the RTC feature. RTC *ReplicationTimeControl `xml:"RTC"` // The ID of the rule. ID *string `xml:"ID"` // The container that stores prefixes. You can specify up to 10 prefixes in each data replication rule. PrefixSet *ReplicationPrefixSet `xml:"PrefixSet"` // The operations that can be synchronized to the destination bucket. If you configure Action in a data replication rule, OSS synchronizes new data and historical data based on the specified value of Action. You can set Action to one or more of the following operation types. Valid values:* ALL (default): PUT, DELETE, and ABORT operations are synchronized to the destination bucket.* PUT: Write operations are synchronized to the destination bucket, including PutObject, PostObject, AppendObject, CopyObject, PutObjectACL, InitiateMultipartUpload, UploadPart, UploadPartCopy, and CompleteMultipartUpload. Action *string `xml:"Action"` // The status of the data replication task. Valid values:* starting: OSS creates a data replication task after a data replication rule is configured.* doing: The replication rule is effective and the replication task is in progress.* closing: OSS clears a data replication task after the corresponding data replication rule is deleted. Status *string `xml:"Status"` }
type ReplicationRules ¶ added in v1.1.0
type ReplicationRules struct { // The ID of data replication rules that you want to delete. You can call the GetBucketReplication operation to obtain the ID. IDs []string `xml:"ID"` }
type ReplicationSourceSelectionCriteria ¶ added in v1.1.0
type ReplicationSourceSelectionCriteria struct { // The container that is used to filter the source objects that are encrypted by using SSE-KMS. This parameter must be specified if the SourceSelectionCriteria parameter is specified in the data replication rule. SseKmsEncryptedObjects *SseKmsEncryptedObjects `xml:"SseKmsEncryptedObjects"` }
type ReplicationTimeControl ¶ added in v1.1.0
type ReplicationTimeControl struct { // Specifies whether to enable RTC.Valid values:* disabled * enabled Status *string `xml:"Status"` }
type RequestBodyTracker ¶
type RequestCommon ¶
type RequestCommon struct { Headers map[string]string Parameters map[string]string Payload io.Reader }
func (*RequestCommon) GetCommonFileds ¶
type RequestCommonInterface ¶
type RestoreObjectRequest ¶
type RestoreObjectRequest struct { // The name of the bucket. Bucket *string `input:"host,bucket,required"` // The name of the object. Key *string `input:"path,key,required"` // The version ID of the source object. VersionId *string `input:"query,versionId"` // The container that stores information about the RestoreObject request. RestoreRequest *RestoreRequest `input:"body,RestoreRequest,xml"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type RestoreObjectResult ¶
type RestoreObjectResult struct { // Version of the object. VersionId *string `output:"header,x-oss-version-id"` // The restoration priority. // This header is displayed only for the Cold Archive or Deep Cold Archive object in the restored state. RestorePriority *string `output:"header,x-oss-object-restore-priority"` ResultCommon }
type RestoreRequest ¶
type ResultCommon ¶
type ResultCommon struct { Status string StatusCode int Headers http.Header OpMetadata OperationMetadata }
func (*ResultCommon) CopyIn ¶
func (r *ResultCommon) CopyIn(status string, statusCode int, headers http.Header, meta OperationMetadata)
type ResultCommonInterface ¶
type ResultCommonInterface interface {
CopyIn(status string, statusCode int, headers http.Header, meta OperationMetadata)
}
type RoutingRule ¶ added in v1.1.0
type RoutingRule struct { // The sequence number that is used to match and run the redirection rules. OSS matches redirection rules based on this parameter. If a match succeeds, only the rule is run and the subsequent rules are not run. This parameter must be specified if RoutingRule is specified. RuleNumber *int64 `xml:"RuleNumber"` // The matching condition. If all of the specified conditions are met, the rule is run. A rule is considered matched only when the rule meets the conditions that are specified by all nodes in Condition. This parameter must be specified if RoutingRule is specified. Condition *RoutingRuleCondition `xml:"Condition"` // The operation to perform after the rule is matched. This parameter must be specified if RoutingRule is specified. Redirect *RoutingRuleRedirect `xml:"Redirect"` }
type RoutingRuleCondition ¶ added in v1.1.0
type RoutingRuleCondition struct { // The prefix of object names. Only objects whose names contain the specified prefix match the rule. KeyPrefixEquals *string `xml:"KeyPrefixEquals"` // Only objects that match this suffix can match this rule. KeySuffixEquals *string `xml:"KeySuffixEquals"` // The HTTP status code. The rule is matched only when the specified object is accessed and the specified HTTP status code is returned. If the redirection rule is the mirroring-based back-to-origin rule, the value of this parameter is 404. HttpErrorCodeReturnedEquals *int64 `xml:"HttpErrorCodeReturnedEquals"` // This rule can only be matched if the request contains the specified header and the value is the specified value. This container can specify up to 10. IncludeHeaders []RoutingRuleIncludeHeader `xml:"IncludeHeader"` }
type RoutingRuleIncludeHeader ¶ added in v1.1.0
type RoutingRuleIncludeHeader struct { // The key of the header. The rule is matched only when the specified header is included in the request and the header value equals the value specified by Equals. Key *string `xml:"Key"` // The value of the header. The rule is matched only when the header specified by Key is included in the request and the header value equals the specified value. Equals *string `xml:"Equals"` }
type RoutingRuleRedirect ¶ added in v1.1.0
type RoutingRuleRedirect struct { // The origin URL for mirroring-based back-to-origin. This parameter takes effect only when the value of RedirectType is Mirror. The origin URL must start with \*\*http://** or **https://\*\* and end with a forward slash (/). OSS adds an object name to the end of the URL to generate a back-to-origin URL. For example, the name of the object to access is myobject. If MirrorURL is set to `http://example.com/`, the back-to-origin URL is `http://example.com/myobject`. If MirrorURL is set to `http://example.com/dir1/`, the back-to-origin URL is `http://example.com/dir1/myobject`. This parameter must be specified if RedirectType is set to Mirror.Valid values:* true * false MirrorURL *string `xml:"MirrorURL"` // Specifies whether to redirect the access to the address specified by Location if the origin returns an HTTP 3xx status code. This parameter takes effect only when the value of RedirectType is Mirror. For example, when a mirroring-based back-to-origin request is initiated, the origin returns 302 and Location is specified.* If you set MirrorFollowRedirect to true, OSS continues requesting the resource at the address specified by Location. The access can be redirected up to 10 times. If the access is redirected more than 10 times, the mirroring-based back-to-origin request fails.* If you set MirrorFollowRedirect to false, OSS returns 302 and passes through Location.Default value: true. MirrorFollowRedirect *bool `xml:"MirrorFollowRedirect"` // If this parameter is set to true, the prefix of the object names is replaced with the value specified by ReplaceKeyPrefixWith. If this parameter is not specified or empty, the prefix of object names is truncated. When the ReplaceKeyWith parameter is not empty, the EnableReplacePrefix parameter cannot be set to true.Default value: false. EnableReplacePrefix *bool `xml:"EnableReplacePrefix"` // The string that is used to replace the requested object name when the request is redirected. This parameter can be set to the ${key} variable, which indicates the object name in the request. For example, if ReplaceKeyWith is set to `prefix/${key}.suffix` and the object to access is test, the value of the Location header is `http://example.com/prefix/test.suffix`. ReplaceKeyWith *string `xml:"ReplaceKeyWith"` // The domain name used for redirection. The domain name must comply with the domain naming rules. For example, if you access an object named test, Protocol is set to https, and Hostname is set to `example.com`, the value of the Location header is `https://example.com/test`. HostName *string `xml:"HostName"` // Specifies whether to include parameters of the original request in the redirection request when the system runs the redirection rule or mirroring-based back-to-origin rule. For example, if the **PassQueryString** parameter is set to true, the `?a=b&c=d` parameter string is included in a request sent to OSS, and the redirection mode is 302, this parameter is added to the Location header. For example, if the request is `Location:example.com?a=b&c=d` and the redirection type is mirroring-based back-to-origin, the ?a=b\&c=d parameter string is also included in the back-to-origin request. Valid values: true and false (default). PassQueryString *bool `xml:"PassQueryString"` // The headers contained in the response that is returned when you use mirroring-based back-to-origin. This parameter takes effect only when the value of RedirectType is Mirror. MirrorHeaders *MirrorHeaders `xml:"MirrorHeaders"` // The string that is used to replace the prefix of the object name during redirection. If the prefix of an object name is empty, the string precedes the object name. You can specify only one of the ReplaceKeyWith and ReplaceKeyPrefixWith parameters in a rule. For example, if you access an object named abc/test.txt, KeyPrefixEquals is set to abc/, ReplaceKeyPrefixWith is set to def/, the value of the Location header is `http://example.com/def/test.txt`. ReplaceKeyPrefixWith *string `xml:"ReplaceKeyPrefixWith"` // The redirection type. Valid values:* **Mirror**: mirroring-based back-to-origin.* **External**: external redirection. OSS returns an HTTP 3xx status code and returns an address for you to redirect to.* **AliCDN**: redirection based on Alibaba Cloud CDN. Compared with external redirection, OSS adds an additional header to the request. After Alibaba Cloud CDN identifies the header, Alibaba Cloud CDN redirects the access to the specified address and returns the obtained data instead of the HTTP 3xx status code that redirects the access to another address. This parameter must be specified if Redirect is specified. RedirectType *string `xml:"RedirectType"` // Is SNI transparent. MirrorSNI *bool `xml:"MirrorSNI"` // The protocol used for redirection. This parameter takes effect only when RedirectType is set to External or AliCDN. For example, if you access an object named test, Protocol is set to https, and Hostname is set to `example.com`, the value of the Location header is `https://example.com/test`. Valid values: **http** and **https**. Protocol *string `xml:"Protocol"` // Specifies whether to check the MD5 hash of the body of the response returned by the origin. This parameter takes effect only when the value of RedirectType is Mirror. When **MirrorCheckMd5** is set to true and the response returned by the origin includes the Content-Md5 header, OSS checks whether the MD5 hash of the obtained data matches the header value. If the MD5 hash of the obtained data does not match the header value, the obtained data is not stored in OSS. Default value: false. MirrorCheckMd5 *bool `xml:"MirrorCheckMd5"` // The HTTP redirect code in the response. This parameter takes effect only when RedirectType is set to External or AliCDN. Valid values: 301, 302, and 307. HttpRedirectCode *int64 `xml:"HttpRedirectCode"` // Is it transmitted transparently '/' to the source site MirrorPassOriginalSlashes *bool `xml:"MirrorPassOriginalSlashes"` // This parameter plays the same role as PassQueryString and has a higher priority than PassQueryString. This parameter takes effect only when the value of RedirectType is Mirror. Default value: false.Valid values:* true * false MirrorPassQueryString *bool `xml:"MirrorPassQueryString"` }
type RoutingRules ¶ added in v1.1.0
type RoutingRules struct { // The specified redirection rule or mirroring-based back-to-origin rule. You can specify up to 20 rules. RoutingRules []RoutingRule `xml:"RoutingRule"` }
type RtcConfiguration ¶ added in v1.1.0
type RtcConfiguration struct { // The container that stores the status of RTC. RTC *ReplicationTimeControl `xml:"RTC"` // The ID of the data replication rule for which you want to configure RTC. ID *string `xml:"ID"` }
type SSEKMS ¶ added in v1.1.0
type SSEKMS struct { // The ID of the key that is managed by Key Management Service (KMS). KeyId *string `xml:"KeyId"` }
type SSERule ¶
type SSERule struct { // The customer master key (CMK) ID in use. A valid value is returned only if you set SSEAlgorithm to KMS // and specify the CMK ID. In other cases, an empty value is returned. KMSMasterKeyID *string `xml:"KMSMasterKeyID"` // The server-side encryption method that is used by default. SSEAlgorithm *string `xml:"SSEAlgorithm"` // Object's encryption algorithm. If this element is not included in the response, // it indicates that the object is using the AES256 encryption algorithm. // This option is only valid if the SSEAlgorithm value is KMS. KMSDataEncryption *string `xml:"KMSDataEncryption"` }
type SelectObjectRequest ¶
type SelectObjectRequest struct { // The name of the bucket. Bucket *string `input:"host,uploadId,required"` // The name of the object. Key *string `input:"path,key,required"` SelectRequest *SelectRequest `input:"nop,SelectRequest,required"` RequestCommon }
type SelectObjectResult ¶
type SelectObjectResult struct { Body io.ReadCloser ResultCommon }
type SelectOptions ¶
type SelectRequest ¶
type SelectRequest struct { Expression *string `xml:"Expression"` InputSerializationSelect InputSerializationSelect `xml:"InputSerialization"` OutputSerializationSelect OutputSerializationSelect `xml:"OutputSerialization"` SelectOptions *SelectOptions `xml:"Options"` }
type SerializationError ¶
type SerializationError struct {
Err error
}
func (*SerializationError) Error ¶
func (e *SerializationError) Error() string
func (*SerializationError) Unwrap ¶
func (e *SerializationError) Unwrap() error
type ServerSideEncryptionRule ¶ added in v1.1.0
type ServerSideEncryptionRule struct { // The container that stores the default server-side encryption method. ApplyServerSideEncryptionByDefault *ApplyServerSideEncryptionByDefault `xml:"ApplyServerSideEncryptionByDefault"` }
type ServiceError ¶
type ServiceError struct { XMLName xml.Name `xml:"Error"` Code string `xml:"Code"` Message string `xml:"Message"` RequestID string `xml:"RequestId"` EC string `xml:"EC"` StatusCode int Snapshot []byte Timestamp time.Time RequestTarget string Headers http.Header }
func (*ServiceError) Error ¶
func (e *ServiceError) Error() string
func (*ServiceError) ErrorCode ¶
func (e *ServiceError) ErrorCode() string
func (*ServiceError) HttpStatusCode ¶
func (e *ServiceError) HttpStatusCode() int
type SignatureVersionType ¶
type SignatureVersionType int
const ( SignatureVersionV1 SignatureVersionType = iota SignatureVersionV4 )
func (SignatureVersionType) String ¶
func (f SignatureVersionType) String() string
type SseKmsEncryptedObjects ¶ added in v1.1.0
type SseKmsEncryptedObjects struct { // Specifies whether to replicate objects that are encrypted by using SSE-KMS. Valid values:* Enabled* Disabled Status StatusType `xml:"Status"` }
type StatusType ¶ added in v1.1.0
type StatusType string
const ( StatusEnabled StatusType = "Enabled" StatusDisabled StatusType = "Disabled" )
Enum values for StatusType
type StorageClassType ¶
type StorageClassType string
StorageClassType The storage class of the bucket
const ( // StorageClassStandard Standard provides highly reliable, highly available, // and high-performance object storage for data that is frequently accessed. StorageClassStandard StorageClassType = "Standard" // StorageClassIA IA provides highly durable storage at lower prices compared with Standard. // IA has a minimum billable size of 64 KB and a minimum billable storage duration of 30 days. StorageClassIA StorageClassType = "IA" // StorageClassArchive Archive provides high-durability storage at lower prices compared with Standard and IA. // Archive has a minimum billable size of 64 KB and a minimum billable storage duration of 60 days. StorageClassArchive StorageClassType = "Archive" // StorageClassColdArchive Cold Archive provides highly durable storage at lower prices compared with Archive. // Cold Archive has a minimum billable size of 64 KB and a minimum billable storage duration of 180 days. StorageClassColdArchive StorageClassType = "ColdArchive" // StorageClassDeepColdArchive Deep Cold Archive provides highly durable storage at lower prices compared with Cold Archive. // Deep Cold Archive has a minimum billable size of 64 KB and a minimum billable storage duration of 180 days. StorageClassDeepColdArchive StorageClassType = "DeepColdArchive" )
Enum values for StorageClassType
type StyleContent ¶ added in v1.1.0
type StyleContent struct { // The content of the style. Content *string `xml:"Content"` }
type StyleInfo ¶ added in v1.1.0
type StyleInfo struct { // The time when the style was created. CreateTime *string `xml:"CreateTime"` // The time when the style was last modified. LastModifyTime *string `xml:"LastModifyTime"` // The category of this style。 Invalid value:image、document、video。 Category *string `xml:"Category"` // The style name. Name *string `xml:"Name"` // The content of the style. Content *string `xml:"Content"` }
type StyleList ¶ added in v1.1.0
type StyleList struct { // The list of styles. Styles []StyleInfo `xml:"Style"` }
type Tag ¶
type Tag struct { // The key of a tag. // * A tag key can be up to 64 bytes in length. // * A tag key cannot start with `http://`, `https://`, or `Aliyun`. // * A tag key must be UTF-8 encoded. // * A tag key cannot be left empty. Key *string `xml:"Key"` // The value of the tag that you want to add or modify. // * A tag value can be up to 128 bytes in length. // * A tag value must be UTF-8 encoded. // * The tag value can be left empty. Value *string `xml:"Value"` }
type Tagging ¶
type Tagging struct { // The container used to store a set of Tags. TagSet *TagSet `xml:"TagSet"` }
type TransferAccelerationConfiguration ¶ added in v1.1.0
type TransferAccelerationConfiguration struct { // Whether the transfer acceleration is enabled for this bucket. Enabled *bool `xml:"Enabled"` }
type TransferTypeType ¶ added in v1.1.0
type TransferTypeType string
const ( TransferTypeInternal TransferTypeType = "internal" TransferTypeOssAcc TransferTypeType = "oss_acc" )
Enum values for TransferTypeType
type TransferTypes ¶ added in v1.1.0
type TransferTypes struct { // The data transfer type that is used to transfer data in data replication. Valid values:* internal (default): the default data transfer link used in OSS.* oss_acc: the link in which data transmission is accelerated. You can set TransferType to oss_acc only when you create CRR rules. Types []string `xml:"Type"` }
type UploadAPIClient ¶
type UploadAPIClient interface { HeadObject(ctx context.Context, request *HeadObjectRequest, optFns ...func(*Options)) (*HeadObjectResult, error) PutObject(ctx context.Context, request *PutObjectRequest, optFns ...func(*Options)) (*PutObjectResult, error) InitiateMultipartUpload(ctx context.Context, request *InitiateMultipartUploadRequest, optFns ...func(*Options)) (*InitiateMultipartUploadResult, error) UploadPart(ctx context.Context, request *UploadPartRequest, optFns ...func(*Options)) (*UploadPartResult, error) CompleteMultipartUpload(ctx context.Context, request *CompleteMultipartUploadRequest, optFns ...func(*Options)) (*CompleteMultipartUploadResult, error) AbortMultipartUpload(ctx context.Context, request *AbortMultipartUploadRequest, optFns ...func(*Options)) (*AbortMultipartUploadResult, error) ListParts(ctx context.Context, request *ListPartsRequest, optFns ...func(*Options)) (*ListPartsResult, error) }
type UploadError ¶
func (*UploadError) Error ¶
func (m *UploadError) Error() string
func (*UploadError) Unwrap ¶
func (m *UploadError) Unwrap() error
type UploadPart ¶
type UploadPartCopyRequest ¶
type UploadPartCopyRequest struct { // The name of the bucket. Bucket *string `input:"host,uploadId,required"` // The name of the object. Key *string `input:"path,key,required"` // Each uploaded part is identified by a number. // Value: 1-10000 //The size limit of a single part is between 100 KB and 5 GB. PartNumber int32 `input:"query,partNumber,required"` // The ID of the multipart upload task. UploadId *string `input:"query,uploadId,required"` // The name of the source bucket. SourceBucket *string `input:"nop,bucket"` // The path of the source object. SourceKey *string `input:"nop,key,required"` // The version ID of the source object. SourceVersionId *string `input:"nop,versionId"` // The range of bytes to copy data from the source object. Range *string `input:"header,x-oss-copy-source-range"` // The copy operation condition. If the ETag value of the source object is // the same as the ETag value provided by the user, OSS copies data. Otherwise, // OSS returns 412 Precondition Failed. IfMatch *string `input:"header,x-oss-copy-source-if-match"` // The object transfer condition. If the input ETag value does not match the ETag value of the object // the system transfers the object normally and returns 200 OK. Otherwise, OSS returns 304 Not Modified. IfNoneMatch *string `input:"header,x-oss-copy-source-if-none-match"` // The object transfer condition. If the specified time is earlier than the actual modified time of the object, // the system transfers the object normally and returns 200 OK. Otherwise, OSS returns 304 Not Modified. // The time must be in GMT. Example: Fri, 13 Nov 2015 14:47:53 GMT. IfModifiedSince *string `input:"header,x-oss-copy-source-if-modified-since"` // The object transfer condition. If the specified time is the same as or later than the actual modified time of the object, // OSS transfers the object normally and returns 200 OK. Otherwise, OSS returns 412 Precondition Failed. // The time must be in GMT. Example: Fri, 13 Nov 2015 14:47:53 GMT. IfUnmodifiedSince *string `input:"header,x-oss-copy-source-if-unmodified-since"` // Specify the speed limit value. The speed limit value ranges from 245760 to 838860800, with a unit of bit/s. TrafficLimit int64 `input:"header,x-oss-traffic-limit"` // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type UploadPartCopyResult ¶
type UploadPartCopyResult struct { // The time when the returned objects were last modified. LastModified *time.Time `xml:"LastModified"` // Entity tag for the uploaded part. ETag *string `xml:"ETag"` // The version ID of the source object. VersionId *string `output:"header,x-oss-copy-source-version-id"` ResultCommon }
type UploadPartRequest ¶
type UploadPartRequest struct { // The name of the bucket. Bucket *string `input:"host,uploadId,required"` // The name of the object. Key *string `input:"path,key,required"` // Each uploaded part is identified by a number. // Value: 1-10000 //The size limit of a single part is between 100 KB and 5 GB. PartNumber int32 `input:"query,partNumber,required"` // The ID of the multipart upload task. UploadId *string `input:"query,uploadId,required"` // The MD5 hash of the object that you want to upload. ContentMD5 *string `input:"header,Content-MD5"` // Specify the speed limit value. The speed limit value ranges from 245760 to 838860800, with a unit of bit/s. TrafficLimit int64 `input:"header,x-oss-traffic-limit"` // Object data. Body io.Reader `input:"body,nop"` // Progress callback function ProgressFn ProgressFunc // The size of the data in the HTTP message body. Unit: bytes. ContentLength *int64 `input:"header,Content-Length"` // The encryption context for multipart upload when using client side encryption, only valid in EncryptionClient CSEMultiPartContext *EncryptionMultiPartContext // To indicate that the requester is aware that the request and data download will incur costs RequestPayer *string `input:"header,x-oss-request-payer"` RequestCommon }
type UploadPartResult ¶
type UploadPartResult struct { // Entity tag for the uploaded part. ETag *string `output:"header,ETag"` // The MD5 hash of the part that you want to upload. ContentMD5 *string `output:"header,Content-MD5"` // The 64-bit CRC value of the part. // This value is calculated based on the ECMA-182 standard. HashCRC64 *string `output:"header,x-oss-hash-crc64ecma"` ResultCommon }
type UploadParts ¶
type UploadParts []UploadPart
func (UploadParts) Len ¶
func (slice UploadParts) Len() int
func (UploadParts) Less ¶
func (slice UploadParts) Less(i, j int) bool
func (UploadParts) Swap ¶
func (slice UploadParts) Swap(i, j int)
type UploadResult ¶
type UploadResult struct { UploadId *string ETag *string VersionId *string HashCRC64 *string ResultCommon }
type Uploader ¶
type Uploader struct {
// contains filtered or unexported fields
}
func NewUploader ¶
func NewUploader(c UploadAPIClient, optFns ...func(*UploaderOptions)) *Uploader
NewUploader creates a new Uploader instance to upload objects. Pass In additional functional options to customize the uploader's behavior.
func (*Uploader) UploadFile ¶
func (u *Uploader) UploadFile(ctx context.Context, request *PutObjectRequest, filePath string, optFns ...func(*UploaderOptions)) (*UploadResult, error)
func (*Uploader) UploadFrom ¶
func (u *Uploader) UploadFrom(ctx context.Context, request *PutObjectRequest, body io.Reader, optFns ...func(*UploaderOptions)) (*UploadResult, error)
type UploaderOptions ¶
type UrlStyleType ¶
type UrlStyleType int
const ( UrlStyleVirtualHosted UrlStyleType = iota UrlStylePath UrlStyleCName )
func (UrlStyleType) String ¶
func (f UrlStyleType) String() string
type UserDefinedLogFieldsConfiguration ¶ added in v1.1.0
type UserDefinedLogFieldsConfiguration struct { // The container that stores the configurations of custom request headers. HeaderSet *LoggingHeaderSet `xml:"HeaderSet"` // The container that stores the configurations of custom URL parameters. ParamSet *LoggingParamSet `xml:"ParamSet"` }
type VersioningConfiguration ¶
type VersioningConfiguration struct { // The versioning state of the bucket. Valid values: Enabled,Suspended Status VersioningStatusType `xml:"Status"` }
type VersioningStatusType ¶
type VersioningStatusType string
VersioningStatusType bucket versioning status
const ( // VersionEnabled Versioning Status definition: Enabled VersionEnabled VersioningStatusType = "Enabled" // VersionSuspended Versioning Status definition: Suspended VersionSuspended VersioningStatusType = "Suspended" )
type WebsiteConfiguration ¶ added in v1.1.0
type WebsiteConfiguration struct { // The container that stores the default homepage. You must specify at least one of the following containers: IndexDocument, ErrorDocument, and RoutingRules. IndexDocument *IndexDocument `xml:"IndexDocument"` // The container that stores the default 404 page. You must specify at least one of the following containers: IndexDocument, ErrorDocument, and RoutingRules. ErrorDocument *ErrorDocument `xml:"ErrorDocument"` // The container that stores the redirection rules. You must specify at least one of the following containers: IndexDocument, ErrorDocument, and RoutingRules. RoutingRules *RoutingRules `xml:"RoutingRules"` }
type WormConfiguration ¶ added in v1.1.0
type WormConfiguration struct { // The ID of the retention policy.>Note If the specified retention policy ID that is used to query the retention policy configurations of the bucket does not exist, OSS returns the 404 error code. WormId *string `xml:"WormId"` // The status of the retention policy. Valid values:- InProgress: indicates that the retention policy is in the InProgress state. By default, a retention policy is in the InProgress state after it is created. The policy remains in this state for 24 hours.- Locked: indicates that the retention policy is in the Locked state. State BucketWormStateType `xml:"State"` // The number of days for which objects can be retained. RetentionPeriodInDays *int32 `xml:"RetentionPeriodInDays"` // The time at which the retention policy was created. CreationDate *string `xml:"CreationDate"` }
type XmlChildren ¶
type XmlDecoderLite ¶
type XmlDecoderLite struct {
// contains filtered or unexported fields
}
func NewXmlDecoderLite ¶
func NewXmlDecoderLite(r io.Reader) *XmlDecoderLite
func (*XmlDecoderLite) Decode ¶
func (dec *XmlDecoderLite) Decode(root *XmlNode) error
Source Files ¶
- api_op_accesspoint.go
- api_op_accesspoint_publicaccessblock.go
- api_op_bucket.go
- api_op_bucket_accessmonitor.go
- api_op_bucket_archivedirectread.go
- api_op_bucket_cname.go
- api_op_bucket_cors.go
- api_op_bucket_encryption.go
- api_op_bucket_httpsconfig.go
- api_op_bucket_inventory.go
- api_op_bucket_lifecycle.go
- api_op_bucket_logging.go
- api_op_bucket_metaquery.go
- api_op_bucket_policy.go
- api_op_bucket_publicaccessblock.go
- api_op_bucket_referer.go
- api_op_bucket_replication.go
- api_op_bucket_resourcegroup.go
- api_op_bucket_style.go
- api_op_bucket_tags.go
- api_op_bucket_transferacceleration.go
- api_op_bucket_website.go
- api_op_bucket_worm.go
- api_op_common.go
- api_op_object.go
- api_op_publicaccessblock.go
- api_op_select_object.go
- api_op_service.go
- checkpoint.go
- client.go
- client_extension.go
- client_paginators.go
- client_presign.go
- config.go
- copier.go
- defaults.go
- downloader.go
- encryption_client.go
- endpoints.go
- enums.go
- errors.go
- filelike.go
- from_ptr.go
- io_utils.go
- limiter.go
- logger.go
- progress.go
- to_ptr.go
- types.go
- uploader.go
- utils.go
- utils_copy.go
- utils_crc.go
- utils_mime.go
- utils_pool.go
- validation.go
- version.go
- xml_utils.go