Documentation ¶
Overview ¶
Package cos is COS(Cloud Object Storage) Go SDK. The V5 version(XML API). There are examples of using each API in the project's 'example' directory.
Index ¶
- Constants
- Variables
- func AddAuthorizationHeader(secretID, secretKey string, sessionToken string, req *http.Request, ...)
- func CheckReaderLen(reader io.Reader) error
- func DecodeURIComponent(s string) (string, error)
- func DividePart(fileSize int64, last int) (int64, int64)
- func EncodePicOperations(pic *PicOperations) string
- func EncodeURIComponent(s string) string
- func FormatRangeOptions(opt *RangeOptions) string
- func GetReaderLen(reader io.Reader) (length int64, err error)
- func IsLenReader(reader io.Reader) bool
- func IsNotFoundError(e error) bool
- func LimitReadCloser(r io.Reader, n int64) io.Reader
- func NewBucketURL(bucketName, region string, secure bool) (*url.URL, error)
- func SetNeedSignHeaders(key string, val bool)
- func TeeReader(reader io.Reader, writer io.Writer, total int64, listener ProgressListener) *teeReader
- type ACLGrant
- type ACLGrantee
- type ACLHeaderOptions
- type ACLXml
- type Animation
- type AnimationVideo
- type Audio
- type AudioAuditingJobConf
- type AudioAuditingJobDetail
- type AudioSectionResult
- type AuditingJobDetail
- type AuthTime
- type AuthorizationTransport
- type BaseURL
- type BatchAccessControlGrants
- type BatchCOSGrant
- type BatchCreateJobOptions
- type BatchCreateJobResult
- type BatchDescribeJob
- type BatchDescribeJobResult
- type BatchGrantee
- type BatchImageAuditingJobResult
- type BatchImageAuditingOptions
- type BatchInitiateRestoreObject
- type BatchJobFailureReasons
- type BatchJobManifest
- type BatchJobManifestLocation
- type BatchJobManifestSpec
- type BatchJobOperation
- type BatchJobOperationCopy
- type BatchJobReport
- type BatchListJobs
- type BatchListJobsMember
- type BatchListJobsOptions
- type BatchListJobsResult
- type BatchMetadata
- type BatchNewObjectMetadata
- type BatchProgressSummary
- type BatchRequestHeaders
- type BatchService
- func (s *BatchService) CreateJob(ctx context.Context, opt *BatchCreateJobOptions, headers *BatchRequestHeaders) (*BatchCreateJobResult, *Response, error)
- func (s *BatchService) DescribeJob(ctx context.Context, id string, headers *BatchRequestHeaders) (*BatchDescribeJobResult, *Response, error)
- func (s *BatchService) ListJobs(ctx context.Context, opt *BatchListJobsOptions, headers *BatchRequestHeaders) (*BatchListJobsResult, *Response, error)
- func (s *BatchService) UpdateJobPriority(ctx context.Context, opt *BatchUpdatePriorityOptions, ...) (*BatchUpdatePriorityResult, *Response, error)
- func (s *BatchService) UpdateJobStatus(ctx context.Context, opt *BatchUpdateStatusOptions, ...) (*BatchUpdateStatusResult, *Response, error)
- type BatchUpdatePriorityOptions
- type BatchUpdatePriorityResult
- type BatchUpdateStatusOptions
- type BatchUpdateStatusResult
- type Bucket
- type BucketCORSRule
- type BucketDomainRule
- type BucketEncryptionConfiguration
- type BucketGetACLResult
- type BucketGetAccelerateResult
- type BucketGetCORSResult
- type BucketGetDomainResult
- type BucketGetEncryptionResult
- type BucketGetIntelligentTieringResult
- type BucketGetInventoryResult
- type BucketGetLifecycleResult
- type BucketGetLocationResult
- type BucketGetLoggingResult
- type BucketGetObjectVersionsOptions
- type BucketGetObjectVersionsResult
- type BucketGetOptions
- type BucketGetOriginResult
- type BucketGetPolicyResult
- type BucketGetRefererResult
- type BucketGetResult
- type BucketGetTaggingResult
- type BucketGetVersionResult
- type BucketGetWebsiteResult
- type BucketIntelligentTieringTransition
- type BucketInventoryDestination
- type BucketInventoryEncryption
- type BucketInventoryFilter
- type BucketInventoryOptionalFields
- type BucketInventorySchedule
- type BucketLifecycleAbortIncompleteMultipartUpload
- type BucketLifecycleAndOperator
- type BucketLifecycleExpiration
- type BucketLifecycleFilter
- type BucketLifecycleNoncurrentVersion
- type BucketLifecycleRule
- type BucketLifecycleTransition
- type BucketListInventoryConfiguartion
- type BucketLoggingEnabled
- type BucketOriginCondition
- type BucketOriginFileInfo
- type BucketOriginHttpHeader
- type BucketOriginInfo
- type BucketOriginParameter
- type BucketOriginRule
- type BucketPutACLOptions
- type BucketPutAccelerateOptions
- type BucketPutCORSOptions
- type BucketPutDomainOptions
- type BucketPutEncryptionOptions
- type BucketPutIntelligentTieringOptions
- type BucketPutInventoryOptions
- type BucketPutLifecycleOptions
- type BucketPutLoggingOptions
- type BucketPutOptions
- type BucketPutOriginOptions
- type BucketPutPolicyOptions
- type BucketPutRefererOptions
- type BucketPutTaggingOptions
- type BucketPutVersionOptions
- type BucketPutWebsiteOptions
- type BucketReplicationRule
- type BucketService
- func (s *BucketService) Delete(ctx context.Context) (*Response, error)
- func (s *BucketService) DeleteBucketReplication(ctx context.Context) (*Response, error)
- func (s *BucketService) DeleteCORS(ctx context.Context) (*Response, error)
- func (s *BucketService) DeleteDomain(ctx context.Context) (*Response, error)
- func (s *BucketService) DeleteEncryption(ctx context.Context) (*Response, error)
- func (s *BucketService) DeleteInventory(ctx context.Context, id string) (*Response, error)
- func (s *BucketService) DeleteLifecycle(ctx context.Context) (*Response, error)
- func (s *BucketService) DeleteOrigin(ctx context.Context) (*Response, error)
- func (s *BucketService) DeletePolicy(ctx context.Context) (*Response, error)
- func (s *BucketService) DeleteTagging(ctx context.Context) (*Response, error)
- func (s *BucketService) DeleteWebsite(ctx context.Context) (*Response, error)
- func (s *BucketService) Get(ctx context.Context, opt *BucketGetOptions) (*BucketGetResult, *Response, error)
- func (s *BucketService) GetACL(ctx context.Context) (*BucketGetACLResult, *Response, error)
- func (s *BucketService) GetAccelerate(ctx context.Context) (*BucketGetAccelerateResult, *Response, error)
- func (s *BucketService) GetBucketReplication(ctx context.Context) (*GetBucketReplicationResult, *Response, error)
- func (s *BucketService) GetCORS(ctx context.Context) (*BucketGetCORSResult, *Response, error)
- func (s *BucketService) GetDomain(ctx context.Context) (*BucketGetDomainResult, *Response, error)
- func (s *BucketService) GetEncryption(ctx context.Context) (*BucketGetEncryptionResult, *Response, error)
- func (s *BucketService) GetIntelligentTiering(ctx context.Context) (*BucketGetIntelligentTieringResult, *Response, error)
- func (s *BucketService) GetInventory(ctx context.Context, id string) (*BucketGetInventoryResult, *Response, error)
- func (s *BucketService) GetLifecycle(ctx context.Context) (*BucketGetLifecycleResult, *Response, error)
- func (s *BucketService) GetLocation(ctx context.Context) (*BucketGetLocationResult, *Response, error)
- func (s *BucketService) GetLogging(ctx context.Context) (*BucketGetLoggingResult, *Response, error)
- func (s *BucketService) GetObjectVersions(ctx context.Context, opt *BucketGetObjectVersionsOptions) (*BucketGetObjectVersionsResult, *Response, error)
- func (s *BucketService) GetOrigin(ctx context.Context) (*BucketGetOriginResult, *Response, error)
- func (s *BucketService) GetPolicy(ctx context.Context) (*BucketGetPolicyResult, *Response, error)
- func (s *BucketService) GetReferer(ctx context.Context) (*BucketGetRefererResult, *Response, error)
- func (s *BucketService) GetTagging(ctx context.Context) (*BucketGetTaggingResult, *Response, error)
- func (s *BucketService) GetVersioning(ctx context.Context) (*BucketGetVersionResult, *Response, error)
- func (s *BucketService) GetWebsite(ctx context.Context) (*BucketGetWebsiteResult, *Response, error)
- func (s *BucketService) Head(ctx context.Context) (*Response, error)
- func (s *BucketService) IsExist(ctx context.Context) (bool, error)
- func (s *BucketService) ListInventoryConfigurations(ctx context.Context, token string) (*ListBucketInventoryConfigResult, *Response, error)
- func (s *BucketService) ListMultipartUploads(ctx context.Context, opt *ListMultipartUploadsOptions) (*ListMultipartUploadsResult, *Response, error)
- func (s *BucketService) Put(ctx context.Context, opt *BucketPutOptions) (*Response, error)
- func (s *BucketService) PutACL(ctx context.Context, opt *BucketPutACLOptions) (*Response, error)
- func (s *BucketService) PutAccelerate(ctx context.Context, opt *BucketPutAccelerateOptions) (*Response, error)
- func (s *BucketService) PutBucketReplication(ctx context.Context, opt *PutBucketReplicationOptions) (*Response, error)
- func (s *BucketService) PutCORS(ctx context.Context, opt *BucketPutCORSOptions) (*Response, error)
- func (s *BucketService) PutDomain(ctx context.Context, opt *BucketPutDomainOptions) (*Response, error)
- func (s *BucketService) PutEncryption(ctx context.Context, opt *BucketPutEncryptionOptions) (*Response, error)
- func (s *BucketService) PutIntelligentTiering(ctx context.Context, opt *BucketPutIntelligentTieringOptions) (*Response, error)
- func (s *BucketService) PutInventory(ctx context.Context, id string, opt *BucketPutInventoryOptions) (*Response, error)
- func (s *BucketService) PutLifecycle(ctx context.Context, opt *BucketPutLifecycleOptions) (*Response, error)
- func (s *BucketService) PutLogging(ctx context.Context, opt *BucketPutLoggingOptions) (*Response, error)
- func (s *BucketService) PutOrigin(ctx context.Context, opt *BucketPutOriginOptions) (*Response, error)
- func (s *BucketService) PutPolicy(ctx context.Context, opt *BucketPutPolicyOptions) (*Response, error)
- func (s *BucketService) PutReferer(ctx context.Context, opt *BucketPutRefererOptions) (*Response, error)
- func (s *BucketService) PutTagging(ctx context.Context, opt *BucketPutTaggingOptions) (*Response, error)
- func (s *BucketService) PutVersioning(ctx context.Context, opt *BucketPutVersionOptions) (*Response, error)
- func (s *BucketService) PutWebsite(ctx context.Context, opt *BucketPutWebsiteOptions) (*Response, error)
- type BucketStatement
- type BucketTaggingTag
- type CASJobParameters
- type CIService
- func (s *CIService) BatchImageAuditing(ctx context.Context, opt *BatchImageAuditingOptions) (*BatchImageAuditingJobResult, *Response, error)
- func (s *CIService) CreateDocProcessJobs(ctx context.Context, opt *CreateDocProcessJobsOptions) (*CreateDocProcessJobsResult, *Response, error)
- func (s *CIService) CreateMediaJobs(ctx context.Context, opt *CreateMediaJobsOptions) (*CreateMediaJobsResult, *Response, error)
- func (s *CIService) CreateMultiMediaJobs(ctx context.Context, opt *CreateMultiMediaJobsOptions) (*CreateMultiMediaJobsResult, *Response, error)
- func (s *CIService) DeleteGuetzli(ctx context.Context) (*Response, error)
- func (s *CIService) DescribeDocProcessBuckets(ctx context.Context, opt *DescribeDocProcessBucketsOptions) (*DescribeDocProcessBucketsResult, *Response, error)
- func (s *CIService) DescribeDocProcessJob(ctx context.Context, jobid string) (*DescribeDocProcessJobResult, *Response, error)
- func (s *CIService) DescribeDocProcessJobs(ctx context.Context, opt *DescribeDocProcessJobsOptions) (*DescribeDocProcessJobsResult, *Response, error)
- func (s *CIService) DescribeDocProcessQueues(ctx context.Context, opt *DescribeDocProcessQueuesOptions) (*DescribeDocProcessQueuesResult, *Response, error)
- func (s *CIService) DescribeMediaJob(ctx context.Context, jobid string) (*DescribeMediaProcessJobResult, *Response, error)
- func (s *CIService) DescribeMediaJobs(ctx context.Context, opt *DescribeMediaJobsOptions) (*DescribeMediaJobsResult, *Response, error)
- func (s *CIService) DescribeMediaProcessBuckets(ctx context.Context, opt *DescribeMediaProcessBucketsOptions) (*DescribeMediaProcessBucketsResult, *Response, error)
- func (s *CIService) DescribeMediaProcessQueues(ctx context.Context, opt *DescribeMediaProcessQueuesOptions) (*DescribeMediaProcessQueuesResult, *Response, error)
- func (s *CIService) DocPreview(ctx context.Context, name string, opt *DocPreviewOptions) (*Response, error)
- func (s *CIService) GenerateQRcode(ctx context.Context, opt *GenerateQRcodeOptions) (*GenerateQRcodeResult, *Response, error)
- func (s *CIService) GenerateQRcodeToFile(ctx context.Context, filePath string, opt *GenerateQRcodeOptions) (*GenerateQRcodeResult, *Response, error)
- func (s *CIService) Get(ctx context.Context, name string, operation string, opt *ObjectGetOptions, ...) (*Response, error)
- func (s *CIService) GetAudioAuditingJob(ctx context.Context, jobid string) (*GetAudioAuditingJobResult, *Response, error)
- func (s *CIService) GetDocumentAuditingJob(ctx context.Context, jobid string) (*GetDocumentAuditingJobResult, *Response, error)
- func (s *CIService) GetFaceEffect(ctx context.Context, name, effectType string, opt *ObjectGetOptions, ...) (*GetFaceEffectResult, *Response, error)
- func (s *CIService) GetGuetzli(ctx context.Context) (*GetGuetzliResult, *Response, error)
- func (s *CIService) GetMediaInfo(ctx context.Context, name string, opt *ObjectGetOptions, id ...string) (*GetMediaInfoResult, *Response, error)
- func (s *CIService) GetQRcode(ctx context.Context, name string, cover int, opt *ObjectGetOptions, ...) (*GetQRcodeResult, *Response, error)
- func (s *CIService) GetSnapshot(ctx context.Context, name string, opt *GetSnapshotOptions, id ...string) (*Response, error)
- func (s *CIService) GetTextAuditingJob(ctx context.Context, jobid string) (*GetTextAuditingJobResult, *Response, error)
- func (s *CIService) GetToFile(ctx context.Context, name, localpath, operation string, opt *ObjectGetOptions, ...) (*Response, error)
- func (s *CIService) GetVideoAuditingJob(ctx context.Context, jobid string) (*GetVideoAuditingJobResult, *Response, error)
- func (s *CIService) GetWebpageAuditingJob(ctx context.Context, jobid string) (*GetWebpageAuditingJobResult, *Response, error)
- func (s *CIService) ImageAuditing(ctx context.Context, name string, opt *ImageRecognitionOptions) (*ImageRecognitionResult, *Response, error)
- func (s *CIService) ImageProcess(ctx context.Context, name string, opt *ImageProcessOptions) (*ImageProcessResult, *Response, error)
- func (s *CIService) ImageRecognition(ctx context.Context, name string, DetectType string) (*ImageRecognitionResult, *Response, error)
- func (s *CIService) Put(ctx context.Context, name string, r io.Reader, uopt *ObjectPutOptions) (*ImageProcessResult, *Response, error)
- func (s *CIService) PutAudioAuditingJob(ctx context.Context, opt *PutAudioAuditingJobOptions) (*PutAudioAuditingJobResult, *Response, error)
- func (s *CIService) PutDocumentAuditingJob(ctx context.Context, opt *PutDocumentAuditingJobOptions) (*PutDocumentAuditingJobResult, *Response, error)
- func (s *CIService) PutFromFile(ctx context.Context, name string, filePath string, opt *ObjectPutOptions) (*ImageProcessResult, *Response, error)
- func (s *CIService) PutGuetzli(ctx context.Context) (*Response, error)
- func (s *CIService) PutTextAuditingJob(ctx context.Context, opt *PutTextAuditingJobOptions) (*PutTextAuditingJobResult, *Response, error)
- func (s *CIService) PutVideoAuditingJob(ctx context.Context, opt *PutVideoAuditingJobOptions) (*PutVideoAuditingJobResult, *Response, error)
- func (s *CIService) PutWebpageAuditingJob(ctx context.Context, opt *PutWebpageAuditingJobOptions) (*PutWebpageAuditingJobResult, *Response, error)
- func (s *CIService) UpdateDocProcessQueue(ctx context.Context, opt *UpdateDocProcessQueueOptions) (*UpdateDocProcessQueueResult, *Response, error)
- func (s *CIService) UpdateMediaProcessQueue(ctx context.Context, opt *UpdateMediaProcessQueueOptions) (*UpdateMediaProcessQueueResult, *Response, error)
- type CSVInputSerialization
- type CSVOutputSerialization
- type CVMCredentialsTransport
- func (t *CVMCredentialsTransport) GetCredential() (string, string, string, error)
- func (t *CVMCredentialsTransport) GetRoles() ([]string, error)
- func (t *CVMCredentialsTransport) RoundTrip(req *http.Request) (*http.Response, error)
- func (t *CVMCredentialsTransport) UpdateCredential(now int64) (string, string, string, error)
- type CVMSecurityCredentials
- type Chunk
- type Client
- type CodeLocation
- type CompleteMultipartUploadOptions
- type CompleteMultipartUploadResult
- type ConcatFragment
- type ConcatTemplate
- type Config
- type Container
- type CopyJobs
- type CopyPartResult
- type CopyResults
- type CreateBucketConfiguration
- type CreateDocProcessJobsOptions
- type CreateDocProcessJobsResult
- type CreateMediaJobsOptions
- type CreateMediaJobsResult
- type CreateMultiMediaJobsOptions
- type CreateMultiMediaJobsResult
- type Credential
- type DataFrame
- type DefaultProgressListener
- type DescribeDocProcessBucketsOptions
- type DescribeDocProcessBucketsResult
- type DescribeDocProcessJobResult
- type DescribeDocProcessJobsOptions
- type DescribeDocProcessJobsResult
- type DescribeDocProcessQueuesOptions
- type DescribeDocProcessQueuesResult
- type DescribeMediaJobsOptions
- type DescribeMediaJobsResult
- type DescribeMediaProcessBucketsOptions
- type DescribeMediaProcessBucketsResult
- type DescribeMediaProcessJobResult
- type DescribeMediaProcessQueuesOptions
- type DescribeMediaProcessQueuesResult
- type DiscardReadCloser
- type DocPreviewOptions
- type DocProcessBucket
- type DocProcessJobDetail
- type DocProcessJobDocProcess
- type DocProcessJobDocProcessResult
- type DocProcessJobInput
- type DocProcessJobOperation
- type DocProcessJobOutput
- type DocProcessQueue
- type DocProcessQueueNotifyConfig
- type DocumentAuditingJobConf
- type DocumentAuditingJobDetail
- type DocumentPageSegmentInfo
- type DocumentPageSegmentResultResult
- type DocumentResultInfo
- type DownloadedBlock
- type ErrorDocument
- type ErrorFrame
- type ErrorResponse
- type FixedLengthReader
- type GenerateQRcodeOptions
- type GenerateQRcodeResult
- type GetAudioAuditingJobResult
- type GetBucketReplicationResult
- type GetDocumentAuditingJobResult
- type GetFaceEffectResult
- type GetFetchTaskResult
- type GetGuetzliResult
- type GetMediaInfoResult
- type GetQRcodeResult
- type GetSnapshotOptions
- type GetTextAuditingJobResult
- type GetVideoAuditingJobResult
- type GetVideoAuditingJobSnapshot
- type GetWebpageAuditingJobResult
- type Image
- type ImageAuditingInputOptions
- type ImageAuditingJobConf
- type ImageAuditingResult
- type ImageProcessOptions
- type ImageProcessResult
- type ImageRecognitionOptions
- type ImageRecognitionResult
- type InitiateMultipartUploadOptions
- type InitiateMultipartUploadResult
- type Initiator
- type JSONInputSerialization
- type JSONOutputSerialization
- type JobInput
- type JobOutput
- type Jobs
- type LibResult
- type LimitedReadCloser
- type ListBucketInventoryConfigResult
- type ListMultipartUploadsOptions
- type ListMultipartUploadsResult
- type ListUploadsResultUpload
- type ListVersionsResultDeleteMarker
- type ListVersionsResultVersion
- type Location
- type MediaProcessBucket
- type MediaProcessJobDetail
- type MediaProcessJobOperation
- type MediaProcessJobsNotifyBody
- type MediaProcessQueue
- type MediaProcessQueueNotifyConfig
- type MultiCopyOptions
- type MultiDownloadCPInfo
- type MultiDownloadOptions
- type MultiUploadOptions
- type Object
- type ObjectCopyHeaderOptions
- type ObjectCopyOptions
- type ObjectCopyPartOptions
- type ObjectCopyResult
- type ObjectDeleteMultiOptions
- type ObjectDeleteMultiResult
- type ObjectDeleteOptions
- type ObjectGetACLResult
- type ObjectGetOptions
- type ObjectGetTaggingResult
- type ObjectHeadOptions
- type ObjectList
- type ObjectListPartsOptions
- type ObjectListPartsResult
- type ObjectListUploadsOptions
- type ObjectListUploadsResult
- type ObjectOptionsOptions
- type ObjectPutACLOptions
- type ObjectPutHeaderOptions
- type ObjectPutOptions
- type ObjectPutTaggingOptions
- type ObjectRestoreOptions
- type ObjectResult
- type ObjectSelectOptions
- type ObjectSelectResponse
- type ObjectSelectResult
- type ObjectService
- func (s *ObjectService) AbortMultipartUpload(ctx context.Context, name, uploadID string) (*Response, error)
- func (s *ObjectService) Append(ctx context.Context, name string, position int, r io.Reader, ...) (int, *Response, error)
- func (s *ObjectService) CompleteMultipartUpload(ctx context.Context, name, uploadID string, ...) (*CompleteMultipartUploadResult, *Response, error)
- func (s *ObjectService) Copy(ctx context.Context, name, sourceURL string, opt *ObjectCopyOptions, ...) (*ObjectCopyResult, *Response, error)
- func (s *ObjectService) CopyPart(ctx context.Context, name, uploadID string, partNumber int, sourceURL string, ...) (*CopyPartResult, *Response, error)
- func (s *ObjectService) Delete(ctx context.Context, name string, opt ...*ObjectDeleteOptions) (*Response, error)
- func (s *ObjectService) DeleteMulti(ctx context.Context, opt *ObjectDeleteMultiOptions) (*ObjectDeleteMultiResult, *Response, error)
- func (s *ObjectService) DeleteTagging(ctx context.Context, name string, id ...string) (*Response, error)
- func (s *ObjectService) Download(ctx context.Context, name string, filepath string, opt *MultiDownloadOptions, ...) (*Response, error)
- func (s *ObjectService) Get(ctx context.Context, name string, opt *ObjectGetOptions, id ...string) (*Response, error)
- func (s *ObjectService) GetACL(ctx context.Context, name string) (*ObjectGetACLResult, *Response, error)
- func (s *ObjectService) GetFetchTask(ctx context.Context, bucket string, taskid string) (*GetFetchTaskResult, *Response, error)
- func (s *ObjectService) GetObjectURL(name string) *url.URL
- func (s *ObjectService) GetPresignedURL(ctx context.Context, httpMethod, name, ak, sk string, expired time.Duration, ...) (*url.URL, error)
- func (s *ObjectService) GetTagging(ctx context.Context, name string, id ...string) (*ObjectGetTaggingResult, *Response, error)
- func (s *ObjectService) GetToFile(ctx context.Context, name, localpath string, opt *ObjectGetOptions, ...) (*Response, error)
- func (s *ObjectService) Head(ctx context.Context, name string, opt *ObjectHeadOptions, id ...string) (*Response, error)
- func (s *ObjectService) InitiateMultipartUpload(ctx context.Context, name string, opt *InitiateMultipartUploadOptions) (*InitiateMultipartUploadResult, *Response, error)
- func (s *ObjectService) IsExist(ctx context.Context, name string, id ...string) (bool, error)
- func (s *ObjectService) ListParts(ctx context.Context, name, uploadID string, opt *ObjectListPartsOptions) (*ObjectListPartsResult, *Response, error)
- func (s *ObjectService) ListUploads(ctx context.Context, opt *ObjectListUploadsOptions) (*ObjectListUploadsResult, *Response, error)
- func (s *ObjectService) MultiCopy(ctx context.Context, name string, sourceURL string, opt *MultiCopyOptions, ...) (*ObjectCopyResult, *Response, error)
- func (s *ObjectService) MultiUpload(ctx context.Context, name string, filepath string, opt *MultiUploadOptions) (*CompleteMultipartUploadResult, *Response, error)
- func (s *ObjectService) Options(ctx context.Context, name string, opt *ObjectOptionsOptions) (*Response, error)
- func (s *ObjectService) PostRestore(ctx context.Context, name string, opt *ObjectRestoreOptions) (*Response, error)
- func (s *ObjectService) Put(ctx context.Context, name string, r io.Reader, uopt *ObjectPutOptions) (*Response, error)
- func (s *ObjectService) PutACL(ctx context.Context, name string, opt *ObjectPutACLOptions) (*Response, error)
- func (s *ObjectService) PutFetchTask(ctx context.Context, bucket string, opt *PutFetchTaskOptions) (*PutFetchTaskResult, *Response, error)
- func (s *ObjectService) PutFromFile(ctx context.Context, name string, filePath string, opt *ObjectPutOptions) (resp *Response, err error)
- func (s *ObjectService) PutTagging(ctx context.Context, name string, opt *ObjectPutTaggingOptions, id ...string) (*Response, error)
- func (s *ObjectService) Select(ctx context.Context, name string, opt *ObjectSelectOptions) (io.ReadCloser, error)
- func (s *ObjectService) SelectToFile(ctx context.Context, name, file string, opt *ObjectSelectOptions) (*ObjectSelectResponse, error)
- func (s *ObjectService) Upload(ctx context.Context, name string, filepath string, opt *MultiUploadOptions) (*CompleteMultipartUploadResult, *Response, error)
- func (s *ObjectService) UploadPart(ctx context.Context, name, uploadID string, partNumber int, r io.Reader, ...) (*Response, error)
- type ObjectTaggingTag
- type ObjectUploadPartOptions
- type OcrResult
- type OriginHttpHeader
- type Owner
- type PicImageInfo
- type PicOperations
- type PicOperationsRules
- type PicOriginalInfo
- type PicProcessObject
- type PresignedURLOptions
- type ProgressEvent
- type ProgressEventType
- type ProgressFrame
- type ProgressListener
- type PutAudioAuditingJobOptions
- type PutAudioAuditingJobResult
- type PutBucketReplicationOptions
- type PutDocumentAuditingJobOptions
- type PutDocumentAuditingJobResult
- type PutFetchTaskOptions
- type PutFetchTaskResult
- type PutTextAuditingJobOptions
- type PutTextAuditingJobResult
- type PutVideoAuditingJobOptions
- type PutVideoAuditingJobResult
- type PutVideoAuditingJobSnapshot
- type PutWebpageAuditingJobOptions
- type PutWebpageAuditingJobResult
- type QRcodeInfo
- type RangeOptions
- type RecognitionInfo
- type RedirectRequestsProtocol
- type ReplicationDestination
- type Response
- type Results
- type RetryOptions
- type Segment
- type SelectInputSerialization
- type SelectOutputSerialization
- type ServiceGetResult
- type ServiceService
- type Snapshot
- type SpriteSnapshotConfig
- type StatsFrame
- type Text
- type TextAuditingJobConf
- type TextAuditingJobDetail
- type TextRecognitionInfo
- type TextSectionResult
- type TimeInterval
- type TransConfig
- type Transcode
- type UpdateDocProcessQueueOptions
- type UpdateDocProcessQueueResult
- type UpdateMediaProcessQueueOptions
- type UpdateMediaProcessQueueResult
- type Video
- type VideoAuditingJobConf
- type Watermark
- type WebpageAuditingJobConf
- type WebpageAuditingJobDetail
- type WebpageImageResult
- type WebpageImageResults
- type WebpageResultInfo
- type WebpageTextResult
- type WebpageTextResults
- type WebsiteRoutingRule
- type WebsiteRoutingRules
- type WorkflowExecutionNotifyBody
Constants ¶
const (
// Version current go sdk version
Version = "0.7.33"
)
Variables ¶
var NeedSignHeaders = map[string]bool{ "host": true, "range": true, "x-cos-acl": true, "x-cos-grant-read": true, "x-cos-grant-write": true, "x-cos-grant-full-control": true, "response-content-type": true, "response-content-language": true, "response-expires": true, "response-cache-control": true, "response-content-disposition": true, "response-content-encoding": true, "cache-control": true, "content-disposition": true, "content-encoding": true, "content-type": true, "content-length": true, "content-md5": true, "transfer-encoding": true, "versionid": true, "expect": true, "expires": true, "x-cos-content-sha1": true, "x-cos-storage-class": true, "if-match": true, "if-modified-since": true, "if-none-match": true, "if-unmodified-since": true, "origin": true, "access-control-request-method": true, "access-control-request-headers": true, "x-cos-object-type": true, }
需要校验的 Headers 列表
Functions ¶
func AddAuthorizationHeader ¶
func AddAuthorizationHeader(secretID, secretKey string, sessionToken string, req *http.Request, authTime *AuthTime)
AddAuthorizationHeader 给 req 增加签名信息
func CheckReaderLen ¶
func DecodeURIComponent ¶
func EncodePicOperations ¶
func EncodePicOperations(pic *PicOperations) string
func EncodeURIComponent ¶
func FormatRangeOptions ¶
func FormatRangeOptions(opt *RangeOptions) string
func IsLenReader ¶
func IsNotFoundError ¶
func NewBucketURL ¶
NewBucketURL 生成 BaseURL 所需的 BucketURL
bucketName: bucket名称, bucket的命名规则为{name}-{appid} ,此处填写的存储桶名称必须为此格式 Region: 区域代码: ap-beijing-1,ap-beijing,ap-shanghai,ap-guangzhou... secure: 是否使用 https
func SetNeedSignHeaders ¶
非线程安全,只能在进程初始化(而不是Client初始化)时做设置
Types ¶
type ACLGrant ¶
type ACLGrant struct { Grantee *ACLGrantee Permission string }
ACLGrant is the param of ACLXml
type ACLGrantee ¶
type ACLGrantee struct { Type string `xml:"type,attr"` UIN string `xml:"uin,omitempty"` URI string `xml:"URI,omitempty"` ID string `xml:",omitempty"` DisplayName string `xml:",omitempty"` SubAccount string `xml:"Subaccount,omitempty"` }
ACLGrantee is the param of ACLGrant
type ACLHeaderOptions ¶
type ACLHeaderOptions struct { XCosACL string `header:"x-cos-acl,omitempty" url:"-" xml:"-"` XCosGrantRead string `header:"x-cos-grant-read,omitempty" url:"-" xml:"-"` XCosGrantWrite string `header:"x-cos-grant-write,omitempty" url:"-" xml:"-"` XCosGrantFullControl string `header:"x-cos-grant-full-control,omitempty" url:"-" xml:"-"` XCosGrantReadACP string `header:"x-cos-grant-read-acp,omitempty" url:"-" xml:"-"` XCosGrantWriteACP string `header:"x-cos-grant-write-acp,omitempty" url:"-" xml:"-"` }
ACLHeaderOptions is the option of ACLHeader
type ACLXml ¶
type ACLXml struct { XMLName xml.Name `xml:"AccessControlPolicy"` Owner *Owner AccessControlList []ACLGrant `xml:"AccessControlList>Grant,omitempty"` }
ACLXml is the ACL body struct
type Animation ¶
type Animation struct { Container *Container `xml:"Container,omitempty"` Video *AnimationVideo `xml:"Video,omitempty"` TimeInterval *TimeInterval `xml:"TimeInterval,omitempty"` }
type AnimationVideo ¶
type AnimationVideo struct { Codec string `xml:"Codec"` Width string `xml:"Width"` Height string `xml:"Height"` Fps string `xml:"Fps"` AnimateOnlyKeepKeyFrame string `xml:"AnimateOnlyKeepKeyFrame"` AnimateTimeIntervalOfFrame string `xml:"AnimateTimeIntervalOfFrame"` AnimateFramesPerSecond string `xml:"AnimateFramesPerSecond"` Quality string `xml:"Quality"` }
有意和转码区分,两种任务关注的参数不一样避免干扰
type AudioAuditingJobConf ¶
type AudioAuditingJobConf struct { DetectType string `xml:",omitempty"` Callback string `xml:",omitempty"` CallbackVersion string `xml:",omitempty"` BizType string `xml:",omitempty"` }
AudioAuditingJobConf is the config of PutAudioAuditingJobOptions
type AudioAuditingJobDetail ¶
type AudioAuditingJobDetail struct { Code string `xml:",omitempty"` Message string `xml:",omitempty"` JobId string `xml:",omitempty"` State string `xml:",omitempty"` CreationTime string `xml:",omitempty"` Object string `xml:",omitempty"` Url string `xml:",omitempty"` DataId string `xml:",omitempty"` AudioText string `xml:",omitempty"` Label string `xml:",omitempty"` Result int `xml:",omitempty"` PornInfo *RecognitionInfo `xml:",omitempty"` TerrorismInfo *RecognitionInfo `xml:",omitempty"` PoliticsInfo *RecognitionInfo `xml:",omitempty"` AdsInfo *RecognitionInfo `xml:",omitempty"` Section []AudioSectionResult `xml:",omitempty"` }
AudioAuditingJobDetail is the detail of GetAudioAuditingJobResult
type AudioSectionResult ¶
type AudioSectionResult struct { Url string `xml:",omitempty"` Text string `xml:",omitempty"` OffsetTime int `xml:",omitempty"` Duration int `xml:",omitempty"` Label string `xml:",omitempty"` Result int `xml:",omitempty"` PornInfo *RecognitionInfo `xml:",omitempty"` TerrorismInfo *RecognitionInfo `xml:",omitempty"` PoliticsInfo *RecognitionInfo `xml:",omitempty"` AdsInfo *RecognitionInfo `xml:",omitempty"` }
AudioSectionResult is the audio section result of AuditingJobDetail/AudioAuditingJobDetail
type AuditingJobDetail ¶
type AuditingJobDetail struct { Code string `xml:",omitempty"` Message string `xml:",omitempty"` JobId string `xml:",omitempty"` State string `xml:",omitempty"` CreationTime string `xml:",omitempty"` Object string `xml:",omitempty"` Url string `xml:",omitempty"` DataId string `xml:",omitempty"` SnapshotCount string `xml:",omitempty"` Label string `xml:",omitempty"` Result int `xml:",omitempty"` PornInfo *RecognitionInfo `xml:",omitempty"` TerrorismInfo *RecognitionInfo `xml:",omitempty"` PoliticsInfo *RecognitionInfo `xml:",omitempty"` AdsInfo *RecognitionInfo `xml:",omitempty"` Snapshot []GetVideoAuditingJobSnapshot `xml:",omitempty"` AudioSection []AudioSectionResult `xml:",omitempty"` }
AuditingJobDetail is the detail of GetVideoAuditingJobResult
type AuthTime ¶
type AuthTime struct { SignStartTime time.Time SignEndTime time.Time KeyStartTime time.Time KeyEndTime time.Time }
AuthTime 用于生成签名所需的 q-sign-time 和 q-key-time 相关参数
type AuthorizationTransport ¶
type AuthorizationTransport struct { SecretID string SecretKey string SessionToken string // 签名多久过期 Expire time.Duration Transport http.RoundTripper // contains filtered or unexported fields }
AuthorizationTransport 给请求增加 Authorization header
func (*AuthorizationTransport) GetCredential ¶
func (t *AuthorizationTransport) GetCredential() (string, string, string)
GetCredential get the ak, sk, token
func (*AuthorizationTransport) SetCredential ¶
func (t *AuthorizationTransport) SetCredential(ak, sk, token string)
SetCredential update the SecretID(ak), SercretKey(sk), sessiontoken
type BaseURL ¶
type BaseURL struct { // 访问 bucket, object 相关 API 的基础 URL(不包含 path 部分): http://example.com BucketURL *url.URL // 访问 service API 的基础 URL(不包含 path 部分): http://example.com ServiceURL *url.URL // 访问 job API 的基础 URL (不包含 path 部分): http://example.com BatchURL *url.URL // 访问 CI 的基础 URL CIURL *url.URL // 访问 Fetch Task 的基础 URL FetchURL *url.URL }
BaseURL 访问各 API 所需的基础 URL
type BatchAccessControlGrants ¶
type BatchAccessControlGrants struct {
COSGrants *BatchCOSGrant `xml:"COSGrant,omitempty" header:"-" url:"-"`
}
type BatchCOSGrant ¶
type BatchCOSGrant struct { Grantee *BatchGrantee `xml:"Grantee" header:"-" url:"-"` Permission string `xml:"Permission" header:"-" url:"-"` }
type BatchCreateJobOptions ¶
type BatchCreateJobOptions struct { XMLName xml.Name `xml:"CreateJobRequest" header:"-" url:"-"` ClientRequestToken string `xml:"ClientRequestToken" header:"-" url:"-"` ConfirmationRequired string `xml:"ConfirmationRequired,omitempty" header:"-" url:"-"` Description string `xml:"Description,omitempty" header:"-" url:"-"` Manifest *BatchJobManifest `xml:"Manifest" header:"-" url:"-"` Operation *BatchJobOperation `xml:"Operation" header:"-" url:"-"` Priority int `xml:"Priority" header:"-" url:"-"` Report *BatchJobReport `xml:"Report" header:"-" url:"-"` RoleArn string `xml:"RoleArn" header:"-" url:"-"` }
type BatchCreateJobResult ¶
type BatchDescribeJob ¶
type BatchDescribeJob struct { ConfirmationRequired string `xml:"ConfirmationRequired,omitempty" header:"-" url:"-"` CreationTime string `xml:"CreationTime,omitempty" header:"-" url:"-"` Description string `xml:"Description,omitempty" header:"-" url:"-"` FailureReasons *BatchJobFailureReasons `xml:"FailureReasons>JobFailure,omitempty" header:"-" url:"-"` JobId string `xml:"JobId" header:"-" url:"-"` Manifest *BatchJobManifest `xml:"Manifest" header:"-" url:"-"` Operation *BatchJobOperation `xml:"Operation" header:"-" url:"-"` Priority int `xml:"Priority" header:"-" url:"-"` ProgressSummary *BatchProgressSummary `xml:"ProgressSummary" header:"-" url:"-"` Report *BatchJobReport `xml:"Report,omitempty" header:"-" url:"-"` RoleArn string `xml:"RoleArn,omitempty" header:"-" url:"-"` Status string `xml:"Status,omitempty" header:"-" url:"-"` StatusUpdateReason string `xml:"StatusUpdateReason,omitempty" header:"-" url:"-"` SuspendedCause string `xml:"SuspendedCause,omitempty" header:"-" url:"-"` SuspendedDate string `xml:"SuspendedDate,omitempty" header:"-" url:"-"` TerminationDate string `xml:"TerminationDate,omitempty" header:"-" url:"-"` }
type BatchDescribeJobResult ¶
type BatchDescribeJobResult struct { XMLName xml.Name `xml:"DescribeJobResult"` Job *BatchDescribeJob `xml:"Job,omitempty"` }
type BatchGrantee ¶
type BatchImageAuditingJobResult ¶
type BatchImageAuditingJobResult struct { XMLName xml.Name `xml:"Response"` JobsDetail []ImageAuditingResult `xml:",omitempty"` RequestId string `xml:",omitempty"` }
BatchImageAuditingJobResult is the result of BatchImageAuditing
type BatchImageAuditingOptions ¶
type BatchImageAuditingOptions struct { XMLName xml.Name `xml:"Request"` Input []ImageAuditingInputOptions `xml:"Input,omitempty"` Conf *ImageAuditingJobConf `xml:"Conf"` }
BatchImageAuditingOptions is the option of BatchImageAuditing
type BatchInitiateRestoreObject ¶
type BatchInitiateRestoreObject struct { ExpirationInDays int `xml:"ExpirationInDays"` JobTier string `xml:"JobTier"` }
BatchInitiateRestoreObject
type BatchJobFailureReasons ¶
type BatchJobManifest ¶
type BatchJobManifest struct { Location *BatchJobManifestLocation `xml:"Location" header:"-" url:"-"` Spec *BatchJobManifestSpec `xml:"Spec" header:"-" url:"-"` }
type BatchJobManifestLocation ¶
type BatchJobManifestLocation struct { ETag string `xml:"ETag" header:"-" url:"-"` ObjectArn string `xml:"ObjectArn" header:"-" url:"-"` ObjectVersionId string `xml:"ObjectVersionId,omitempty" header:"-" url:"-"` }
BatchJobManifest
type BatchJobManifestSpec ¶
type BatchJobOperation ¶
type BatchJobOperation struct { PutObjectCopy *BatchJobOperationCopy `xml:"COSPutObjectCopy,omitempty" header:"-" url:"-"` RestoreObject *BatchInitiateRestoreObject `xml:"COSInitiateRestoreObject,omitempty" header:"-" url:"-"` }
BatchJobOperation
type BatchJobOperationCopy ¶
type BatchJobOperationCopy struct { AccessControlGrants *BatchAccessControlGrants `xml:"AccessControlGrants,omitempty" header:"-" url:"-"` CannedAccessControlList string `xml:"CannedAccessControlList,omitempty" header:"-" url:"-"` MetadataDirective string `xml:"MetadataDirective,omitempty" header:"-" url:"-"` ModifiedSinceConstraint int64 `xml:"ModifiedSinceConstraint,omitempty" header:"-" url:"-"` UnModifiedSinceConstraint int64 `xml:"UnModifiedSinceConstraint,omitempty" header:"-" url:"-"` NewObjectMetadata *BatchNewObjectMetadata `xml:"NewObjectMetadata,omitempty" header:"-" url:"-"` StorageClass string `xml:"StorageClass,omitempty" header:"-" url:"-"` TargetResource string `xml:"TargetResource" header:"-" url:"-"` }
type BatchJobReport ¶
type BatchJobReport struct { Bucket string `xml:"Bucket" header:"-" url:"-"` Enabled string `xml:"Enabled" header:"-" url:"-"` Format string `xml:"Format" header:"-" url:"-"` Prefix string `xml:"Prefix,omitempty" header:"-" url:"-"` ReportScope string `xml:"ReportScope" header:"-" url:"-"` }
BatchJobReport
type BatchListJobs ¶
type BatchListJobs struct {
Members []BatchListJobsMember `xml:"member,omitempty" header:"-" url:"-"`
}
type BatchListJobsMember ¶
type BatchListJobsMember struct { CreationTime string `xml:"CreationTime,omitempty" header:"-" url:"-"` Description string `xml:"Description,omitempty" header:"-" url:"-"` JobId string `xml:"JobId,omitempty" header:"-" url:"-"` Operation string `xml:"Operation,omitempty" header:"-" url:"-"` Priority int `xml:"Priority,omitempty" header:"-" url:"-"` ProgressSummary *BatchProgressSummary `xml:"ProgressSummary,omitempty" header:"-" url:"-"` Status string `xml:"Status,omitempty" header:"-" url:"-"` TerminationDate string `xml:"TerminationDate,omitempty" header:"-" url:"-"` }
type BatchListJobsOptions ¶
type BatchListJobsResult ¶
type BatchListJobsResult struct { XMLName xml.Name `xml:"ListJobsResult"` Jobs *BatchListJobs `xml:"Jobs,omitempty"` NextToken string `xml:"NextToken,omitempty"` }
type BatchMetadata ¶
type BatchMetadata struct { Key string `xml:"Key" header:"-" url:"-"` Value string `xml:"Value" header:"-" url:"-"` }
BatchJobOperationCopy
type BatchNewObjectMetadata ¶
type BatchNewObjectMetadata struct { CacheControl string `xml:"CacheControl,omitempty" header:"-" url:"-"` ContentDisposition string `xml:"ContentDisposition,omitempty" header:"-" url:"-"` ContentEncoding string `xml:"ContentEncoding,omitempty" header:"-" url:"-"` ContentType string `xml:"ContentType,omitempty" header:"-" url:"-"` HttpExpiresDate string `xml:"HttpExpiresDate,omitempty" header:"-" url:"-"` SSEAlgorithm string `xml:"SSEAlgorithm,omitempty" header:"-" url:"-"` UserMetadata []BatchMetadata `xml:"UserMetadata>member,omitempty" header:"-" url:"-"` }
type BatchProgressSummary ¶
type BatchProgressSummary struct { NumberOfTasksFailed int `xml:"NumberOfTasksFailed" header:"-" url:"-"` NumberOfTasksSucceeded int `xml:"NumberOfTasksSucceeded" header:"-" url:"-"` TotalNumberOfTasks int `xml:"TotalNumberOfTasks" header:"-" url:"-"` }
BatchProgressSummary
type BatchRequestHeaders ¶
type BatchService ¶
type BatchService service
func (*BatchService) CreateJob ¶
func (s *BatchService) CreateJob(ctx context.Context, opt *BatchCreateJobOptions, headers *BatchRequestHeaders) (*BatchCreateJobResult, *Response, error)
func (*BatchService) DescribeJob ¶
func (s *BatchService) DescribeJob(ctx context.Context, id string, headers *BatchRequestHeaders) (*BatchDescribeJobResult, *Response, error)
func (*BatchService) ListJobs ¶
func (s *BatchService) ListJobs(ctx context.Context, opt *BatchListJobsOptions, headers *BatchRequestHeaders) (*BatchListJobsResult, *Response, error)
func (*BatchService) UpdateJobPriority ¶
func (s *BatchService) UpdateJobPriority(ctx context.Context, opt *BatchUpdatePriorityOptions, headers *BatchRequestHeaders) (*BatchUpdatePriorityResult, *Response, error)
func (*BatchService) UpdateJobStatus ¶
func (s *BatchService) UpdateJobStatus(ctx context.Context, opt *BatchUpdateStatusOptions, headers *BatchRequestHeaders) (*BatchUpdateStatusResult, *Response, error)
type BatchUpdateStatusResult ¶
type Bucket ¶
type Bucket struct { Name string Region string `xml:"Location,omitempty"` CreationDate string `xml:",omitempty"` }
Bucket is the meta info of Bucket
type BucketCORSRule ¶
type BucketCORSRule struct { ID string `xml:"ID,omitempty"` AllowedMethods []string `xml:"AllowedMethod"` AllowedOrigins []string `xml:"AllowedOrigin"` AllowedHeaders []string `xml:"AllowedHeader,omitempty"` MaxAgeSeconds int `xml:"MaxAgeSeconds,omitempty"` ExposeHeaders []string `xml:"ExposeHeader,omitempty"` }
BucketCORSRule is the rule of BucketCORS
type BucketDomainRule ¶
type BucketEncryptionConfiguration ¶
type BucketEncryptionConfiguration struct {
SSEAlgorithm string `xml:"SSEAlgorithm"`
}
type BucketGetAccelerateResult ¶
type BucketGetAccelerateResult BucketPutAccelerateOptions
type BucketGetCORSResult ¶
type BucketGetCORSResult struct { XMLName xml.Name `xml:"CORSConfiguration"` Rules []BucketCORSRule `xml:"CORSRule,omitempty"` }
BucketGetCORSResult is the result of GetBucketCORS
type BucketGetDomainResult ¶
type BucketGetDomainResult BucketPutDomainOptions
type BucketGetEncryptionResult ¶
type BucketGetEncryptionResult BucketPutEncryptionOptions
type BucketGetIntelligentTieringResult ¶
type BucketGetIntelligentTieringResult BucketPutIntelligentTieringOptions
type BucketGetInventoryResult ¶
type BucketGetInventoryResult BucketPutInventoryOptions
BucketGetInventoryResult same struct to options
type BucketGetLifecycleResult ¶
type BucketGetLifecycleResult struct { XMLName xml.Name `xml:"LifecycleConfiguration"` Rules []BucketLifecycleRule `xml:"Rule,omitempty"` }
BucketGetLifecycleResult is the result of BucketGetLifecycle
type BucketGetLocationResult ¶
type BucketGetLocationResult struct { XMLName xml.Name `xml:"LocationConstraint"` Location string `xml:",chardata"` }
BucketGetLocationResult is the result of BucketGetLocation
type BucketGetLoggingResult ¶
type BucketGetLoggingResult BucketPutLoggingOptions
BucketGetLoggingResult is the result of GetBucketLogging
type BucketGetObjectVersionsOptions ¶
type BucketGetObjectVersionsOptions struct { Prefix string `url:"prefix,omitempty"` Delimiter string `url:"delimiter,omitempty"` EncodingType string `url:"encoding-type,omitempty"` KeyMarker string `url:"key-marker,omitempty"` VersionIdMarker string `url:"version-id-marker,omitempty"` MaxKeys int `url:"max-keys,omitempty"` }
type BucketGetObjectVersionsResult ¶
type BucketGetObjectVersionsResult struct { XMLName xml.Name `xml:"ListVersionsResult"` Name string `xml:"Name,omitempty"` EncodingType string `xml:"EncodingType,omitempty"` Prefix string `xml:"Prefix,omitempty"` KeyMarker string `xml:"KeyMarker,omitempty"` VersionIdMarker string `xml:"VersionIdMarker,omitempty"` MaxKeys int `xml:"MaxKeys,omitempty"` Delimiter string `xml:"Delimiter,omitempty"` IsTruncated bool `xml:"IsTruncated,omitempty"` NextKeyMarker string `xml:"NextKeyMarker,omitempty"` NextVersionIdMarker string `xml:"NextVersionIdMarker,omitempty"` CommonPrefixes []string `xml:"CommonPrefixes>Prefix,omitempty"` Version []ListVersionsResultVersion `xml:"Version,omitempty"` DeleteMarker []ListVersionsResultDeleteMarker `xml:"DeleteMarker,omitempty"` }
type BucketGetOptions ¶
type BucketGetOptions struct { Prefix string `url:"prefix,omitempty"` Delimiter string `url:"delimiter,omitempty"` EncodingType string `url:"encoding-type,omitempty"` Marker string `url:"marker,omitempty"` MaxKeys int `url:"max-keys,omitempty"` }
BucketGetOptions is the option of GetBucket
type BucketGetOriginResult ¶
type BucketGetOriginResult BucketPutOriginOptions
type BucketGetPolicyResult ¶
type BucketGetPolicyResult BucketPutPolicyOptions
type BucketGetRefererResult ¶
type BucketGetRefererResult BucketPutRefererOptions
type BucketGetResult ¶
type BucketGetResult struct { XMLName xml.Name `xml:"ListBucketResult"` Name string Prefix string `xml:"Prefix,omitempty"` Marker string `xml:"Marker,omitempty"` NextMarker string `xml:"NextMarker,omitempty"` Delimiter string `xml:"Delimiter,omitempty"` MaxKeys int IsTruncated bool Contents []Object `xml:"Contents,omitempty"` CommonPrefixes []string `xml:"CommonPrefixes>Prefix,omitempty"` EncodingType string `xml:"EncodingType,omitempty"` }
BucketGetResult is the result of GetBucket
type BucketGetTaggingResult ¶
type BucketGetTaggingResult struct { XMLName xml.Name `xml:"Tagging"` TagSet []BucketTaggingTag `xml:"TagSet>Tag,omitempty"` }
BucketGetTaggingResult is the result of BucketGetTagging
type BucketGetVersionResult ¶
type BucketGetVersionResult BucketPutVersionOptions
BucketGetVersionResult is the result of GetBucketVersioning
type BucketGetWebsiteResult ¶
type BucketGetWebsiteResult BucketPutWebsiteOptions
type BucketInventoryDestination ¶
type BucketInventoryDestination struct { Bucket string `xml:"Bucket"` AccountId string `xml:"AccountId,omitempty"` Prefix string `xml:"Prefix,omitempty"` Format string `xml:"Format"` Encryption *BucketInventoryEncryption `xml:"Encryption,omitempty"` }
BucketInventoryDestination ...
type BucketInventoryEncryption ¶
type BucketInventoryEncryption struct {
SSECOS string `xml:"SSE-COS"`
}
BucketInventoryEncryption ...
type BucketInventoryFilter ¶
type BucketInventoryFilter struct {
Prefix string `xml:"Prefix,omitempty"`
}
BucketInventoryFilter ...
type BucketInventoryOptionalFields ¶
type BucketInventoryOptionalFields struct {
BucketInventoryFields []string `xml:"Field,omitempty"`
}
BucketInventoryOptionalFields ...
type BucketInventorySchedule ¶
type BucketInventorySchedule struct {
Frequency string `xml:"Frequency"`
}
BucketInventorySchedule ...
type BucketLifecycleAbortIncompleteMultipartUpload ¶
type BucketLifecycleAbortIncompleteMultipartUpload struct {
DaysAfterInitiation int `xml:"DaysAfterInitiation,omitempty"`
}
BucketLifecycleAbortIncompleteMultipartUpload is the param of BucketLifecycleRule
type BucketLifecycleAndOperator ¶
type BucketLifecycleAndOperator struct { Prefix string `xml:"Prefix,omitempty"` Tag []BucketTaggingTag `xml:"Tag,omitempty"` }
type BucketLifecycleExpiration ¶
type BucketLifecycleExpiration struct { Date string `xml:"Date,omitempty"` Days int `xml:"Days,omitempty"` ExpiredObjectDeleteMarker bool `xml:"ExpiredObjectDeleteMarker,omitempty"` }
BucketLifecycleExpiration is the param of BucketLifecycleRule
type BucketLifecycleFilter ¶
type BucketLifecycleFilter struct { Prefix string `xml:"Prefix,omitempty"` Tag *BucketTaggingTag `xml:"Tag,omitempty"` And *BucketLifecycleAndOperator `xml:"And,omitempty"` }
BucketLifecycleFilter is the param of BucketLifecycleRule
type BucketLifecycleRule ¶
type BucketLifecycleRule struct { ID string `xml:"ID,omitempty"` Status string Filter *BucketLifecycleFilter `xml:"Filter,omitempty"` Transition []BucketLifecycleTransition `xml:"Transition,omitempty"` Expiration *BucketLifecycleExpiration `xml:"Expiration,omitempty"` AbortIncompleteMultipartUpload *BucketLifecycleAbortIncompleteMultipartUpload `xml:"AbortIncompleteMultipartUpload,omitempty"` NoncurrentVersionTransition []BucketLifecycleNoncurrentVersion `xml:"NoncurrentVersionTransition,omitempty"` NoncurrentVersionExpiration *BucketLifecycleNoncurrentVersion `xml:"NoncurrentVersionExpiration,omitempty"` }
BucketLifecycleRule is the rule of BucketLifecycle
type BucketLifecycleTransition ¶
type BucketLifecycleTransition struct { Date string `xml:"Date,omitempty"` Days int `xml:"Days,omitempty"` StorageClass string }
BucketLifecycleTransition is the param of BucketLifecycleRule
type BucketListInventoryConfiguartion ¶
type BucketListInventoryConfiguartion BucketPutInventoryOptions
BucketListInventoryConfiguartion same struct to options
type BucketLoggingEnabled ¶
type BucketLoggingEnabled struct { TargetBucket string `xml:"TargetBucket"` TargetPrefix string `xml:"TargetPrefix"` }
BucketLoggingEnabled main struct of logging
type BucketOriginCondition ¶
type BucketOriginFileInfo ¶
type BucketOriginHttpHeader ¶
type BucketOriginHttpHeader struct { // 目前还不支持 FollowAllHeaders // FollowAllHeaders bool `xml:"FollowAllHeaders,omitempty"` NewHttpHeaders []OriginHttpHeader `xml:"NewHttpHeaders>Header,omitempty"` FollowHttpHeaders []OriginHttpHeader `xml:"FollowHttpHeaders>Header,omitempty"` }
type BucketOriginInfo ¶
type BucketOriginInfo struct { HostInfo string `xml:"HostInfo>HostName,omitempty"` FileInfo *BucketOriginFileInfo `xml:"FileInfo,omitempty"` }
type BucketOriginParameter ¶
type BucketOriginParameter struct { Protocol string `xml:"Protocol,omitempty"` FollowQueryString bool `xml:"FollowQueryString,omitempty"` HttpHeader *BucketOriginHttpHeader `xml:"HttpHeader,omitempty"` FollowRedirection bool `xml:"FollowRedirection,omitempty"` HttpRedirectCode string `xml:"HttpRedirectCode,omitempty"` CopyOriginData bool `xml:"CopyOriginData,omitempty"` }
type BucketOriginRule ¶
type BucketOriginRule struct { RulePriority int `xml:"RulePriority,omitempty"` OriginType string `xml:"OriginType,omitempty"` OriginCondition *BucketOriginCondition `xml:"OriginCondition,omitempty"` OriginParameter *BucketOriginParameter `xml:"OriginParameter,omitempty"` OriginInfo *BucketOriginInfo `xml:"OriginInfo,omitempty"` }
type BucketPutACLOptions ¶
type BucketPutACLOptions struct { Header *ACLHeaderOptions `url:"-" xml:"-"` Body *ACLXml `url:"-" header:"-"` }
BucketPutACLOptions is the option of PutBucketACL
type BucketPutCORSOptions ¶
type BucketPutCORSOptions struct { XMLName xml.Name `xml:"CORSConfiguration"` Rules []BucketCORSRule `xml:"CORSRule,omitempty"` }
BucketPutCORSOptions is the option of PutBucketCORS
type BucketPutDomainOptions ¶
type BucketPutDomainOptions struct { XMLName xml.Name `xml:"DomainConfiguration"` Rules []BucketDomainRule `xml:"DomainRule,omitempty"` }
type BucketPutEncryptionOptions ¶
type BucketPutEncryptionOptions struct { XMLName xml.Name `xml:"ServerSideEncryptionConfiguration"` Rule *BucketEncryptionConfiguration `xml:"Rule>ApplyServerSideEncryptionByDefault"` }
type BucketPutIntelligentTieringOptions ¶
type BucketPutIntelligentTieringOptions struct { XMLName xml.Name `xml:"IntelligentTieringConfiguration"` Status string `xml:"Status,omitempty"` Transition *BucketIntelligentTieringTransition `xml:"Transition,omitempty"` }
type BucketPutInventoryOptions ¶
type BucketPutInventoryOptions struct { XMLName xml.Name `xml:"InventoryConfiguration"` ID string `xml:"Id"` IsEnabled string `xml:"IsEnabled"` IncludedObjectVersions string `xml:"IncludedObjectVersions"` Filter *BucketInventoryFilter `xml:"Filter,omitempty"` OptionalFields *BucketInventoryOptionalFields `xml:"OptionalFields,omitempty"` Schedule *BucketInventorySchedule `xml:"Schedule"` Destination *BucketInventoryDestination `xml:"Destination>COSBucketDestination"` }
BucketPutInventoryOptions ...
type BucketPutLifecycleOptions ¶
type BucketPutLifecycleOptions struct { XMLName xml.Name `xml:"LifecycleConfiguration"` Rules []BucketLifecycleRule `xml:"Rule,omitempty"` }
BucketPutLifecycleOptions is the option of PutBucketLifecycle
type BucketPutLoggingOptions ¶
type BucketPutLoggingOptions struct { XMLName xml.Name `xml:"BucketLoggingStatus"` LoggingEnabled *BucketLoggingEnabled `xml:"LoggingEnabled,omitempty"` }
BucketPutLoggingOptions is the options of PutBucketLogging
type BucketPutOptions ¶
type BucketPutOptions struct { XCosACL string `header:"x-cos-acl,omitempty" url:"-" xml:"-"` XCosGrantRead string `header:"x-cos-grant-read,omitempty" url:"-" xml:"-"` XCosGrantWrite string `header:"x-cos-grant-write,omitempty" url:"-" xml:"-"` XCosGrantFullControl string `header:"x-cos-grant-full-control,omitempty" url:"-" xml:"-"` XCosGrantReadACP string `header:"x-cos-grant-read-acp,omitempty" url:"-" xml:"-"` XCosGrantWriteACP string `header:"x-cos-grant-write-acp,omitempty" url:"-" xml:"-"` CreateBucketConfiguration *CreateBucketConfiguration `header:"-" url:"-" xml:"-"` }
BucketPutOptions is same to the ACLHeaderOptions
type BucketPutOriginOptions ¶
type BucketPutOriginOptions struct { XMLName xml.Name `xml:"OriginConfiguration"` Rule []BucketOriginRule `xml:"OriginRule"` }
type BucketPutPolicyOptions ¶
type BucketPutPolicyOptions struct { Statement []BucketStatement `json:"statement,omitempty"` Version string `json:"version,omitempty"` Principal map[string][]string `json:"principal,omitempty"` }
type BucketPutRefererOptions ¶
type BucketPutTaggingOptions ¶
type BucketPutTaggingOptions struct { XMLName xml.Name `xml:"Tagging"` TagSet []BucketTaggingTag `xml:"TagSet>Tag,omitempty"` }
BucketPutTaggingOptions is the option of BucketPutTagging
type BucketPutVersionOptions ¶
type BucketPutVersionOptions struct { XMLName xml.Name `xml:"VersioningConfiguration"` Status string `xml:"Status"` }
BucketPutVersionOptions is the options of PutBucketVersioning
type BucketPutWebsiteOptions ¶
type BucketPutWebsiteOptions struct { XMLName xml.Name `xml:"WebsiteConfiguration"` Index string `xml:"IndexDocument>Suffix"` RedirectProtocol *RedirectRequestsProtocol `xml:"RedirectAllRequestsTo,omitempty"` Error *ErrorDocument `xml:"ErrorDocument,omitempty"` RoutingRules *WebsiteRoutingRules `xml:"RoutingRules,omitempty"` }
type BucketReplicationRule ¶
type BucketReplicationRule struct { ID string `xml:"ID,omitempty"` Status string `xml:"Status"` Prefix string `xml:"Prefix"` Destination *ReplicationDestination `xml:"Destination"` }
BucketReplicationRule is the main param of replication
type BucketService ¶
type BucketService service
BucketService 相关 API
func (*BucketService) Delete ¶
func (s *BucketService) Delete(ctx context.Context) (*Response, error)
Delete Bucket请求可以在指定账号下删除Bucket,删除之前要求Bucket为空。
func (*BucketService) DeleteBucketReplication ¶
func (s *BucketService) DeleteBucketReplication(ctx context.Context) (*Response, error)
DeleteBucketReplication https://cloud.tencent.com/document/product/436/19221
func (*BucketService) DeleteCORS ¶
func (s *BucketService) DeleteCORS(ctx context.Context) (*Response, error)
DeleteCORS 实现 Bucket 跨域访问配置删除。
func (*BucketService) DeleteDomain ¶
func (s *BucketService) DeleteDomain(ctx context.Context) (*Response, error)
func (*BucketService) DeleteEncryption ¶
func (s *BucketService) DeleteEncryption(ctx context.Context) (*Response, error)
func (*BucketService) DeleteInventory ¶
DeleteBucketInventory https://cloud.tencent.com/document/product/436/33704
func (*BucketService) DeleteLifecycle ¶
func (s *BucketService) DeleteLifecycle(ctx context.Context) (*Response, error)
DeleteLifecycle 请求实现删除生命周期管理。 https://www.qcloud.com/document/product/436/8284
func (*BucketService) DeleteOrigin ¶
func (s *BucketService) DeleteOrigin(ctx context.Context) (*Response, error)
func (*BucketService) DeletePolicy ¶
func (s *BucketService) DeletePolicy(ctx context.Context) (*Response, error)
func (*BucketService) DeleteTagging ¶
func (s *BucketService) DeleteTagging(ctx context.Context) (*Response, error)
DeleteTagging 接口实现删除指定Bucket的标签。
func (*BucketService) DeleteWebsite ¶
func (s *BucketService) DeleteWebsite(ctx context.Context) (*Response, error)
func (*BucketService) Get ¶
func (s *BucketService) Get(ctx context.Context, opt *BucketGetOptions) (*BucketGetResult, *Response, error)
Get Bucket请求等同于 List Object请求,可以列出该Bucket下部分或者所有Object,发起该请求需要拥有Read权限。
func (*BucketService) GetACL ¶
func (s *BucketService) GetACL(ctx context.Context) (*BucketGetACLResult, *Response, error)
GetACL 使用API读取Bucket的ACL表,只有所有者有权操作。
func (*BucketService) GetAccelerate ¶
func (s *BucketService) GetAccelerate(ctx context.Context) (*BucketGetAccelerateResult, *Response, error)
func (*BucketService) GetBucketReplication ¶
func (s *BucketService) GetBucketReplication(ctx context.Context) (*GetBucketReplicationResult, *Response, error)
GetBucketReplication https://cloud.tencent.com/document/product/436/19222
func (*BucketService) GetCORS ¶
func (s *BucketService) GetCORS(ctx context.Context) (*BucketGetCORSResult, *Response, error)
GetCORS 实现 Bucket 跨域访问配置读取。
func (*BucketService) GetDomain ¶
func (s *BucketService) GetDomain(ctx context.Context) (*BucketGetDomainResult, *Response, error)
func (*BucketService) GetEncryption ¶
func (s *BucketService) GetEncryption(ctx context.Context) (*BucketGetEncryptionResult, *Response, error)
func (*BucketService) GetIntelligentTiering ¶
func (s *BucketService) GetIntelligentTiering(ctx context.Context) (*BucketGetIntelligentTieringResult, *Response, error)
func (*BucketService) GetInventory ¶
func (s *BucketService) GetInventory(ctx context.Context, id string) (*BucketGetInventoryResult, *Response, error)
GetBucketInventory https://cloud.tencent.com/document/product/436/33705
func (*BucketService) GetLifecycle ¶
func (s *BucketService) GetLifecycle(ctx context.Context) (*BucketGetLifecycleResult, *Response, error)
GetLifecycle 请求实现读取生命周期管理的配置。当配置不存在时,返回404 Not Found。 https://www.qcloud.com/document/product/436/8278
func (*BucketService) GetLocation ¶
func (s *BucketService) GetLocation(ctx context.Context) (*BucketGetLocationResult, *Response, error)
GetLocation 接口获取Bucket所在地域信息,只有Bucket所有者有权限读取信息。
func (*BucketService) GetLogging ¶
func (s *BucketService) GetLogging(ctx context.Context) (*BucketGetLoggingResult, *Response, error)
GetBucketLogging https://cloud.tencent.com/document/product/436/17053
func (*BucketService) GetObjectVersions ¶
func (s *BucketService) GetObjectVersions(ctx context.Context, opt *BucketGetObjectVersionsOptions) (*BucketGetObjectVersionsResult, *Response, error)
func (*BucketService) GetOrigin ¶
func (s *BucketService) GetOrigin(ctx context.Context) (*BucketGetOriginResult, *Response, error)
func (*BucketService) GetPolicy ¶
func (s *BucketService) GetPolicy(ctx context.Context) (*BucketGetPolicyResult, *Response, error)
func (*BucketService) GetReferer ¶
func (s *BucketService) GetReferer(ctx context.Context) (*BucketGetRefererResult, *Response, error)
func (*BucketService) GetTagging ¶
func (s *BucketService) GetTagging(ctx context.Context) (*BucketGetTaggingResult, *Response, error)
GetTagging 接口实现获取指定Bucket的标签。
func (*BucketService) GetVersioning ¶
func (s *BucketService) GetVersioning(ctx context.Context) (*BucketGetVersionResult, *Response, error)
GetVersion https://cloud.tencent.com/document/product/436/19888
func (*BucketService) GetWebsite ¶
func (s *BucketService) GetWebsite(ctx context.Context) (*BucketGetWebsiteResult, *Response, error)
func (*BucketService) Head ¶
func (s *BucketService) Head(ctx context.Context) (*Response, error)
Head Bucket请求可以确认是否存在该Bucket,是否有权限访问,Head的权限与Read一致。
当其存在时,返回 HTTP 状态码200; 当无权限时,返回 HTTP 状态码403; 当不存在时,返回 HTTP 状态码404。
func (*BucketService) ListInventoryConfigurations ¶
func (s *BucketService) ListInventoryConfigurations(ctx context.Context, token string) (*ListBucketInventoryConfigResult, *Response, error)
ListBucketInventoryConfigurations https://cloud.tencent.com/document/product/436/33706
func (*BucketService) ListMultipartUploads ¶
func (s *BucketService) ListMultipartUploads(ctx context.Context, opt *ListMultipartUploadsOptions) (*ListMultipartUploadsResult, *Response, error)
ListMultipartUploads 用来查询正在进行中的分块上传。单次最多列出1000个正在进行中的分块上传。
func (*BucketService) Put ¶
func (s *BucketService) Put(ctx context.Context, opt *BucketPutOptions) (*Response, error)
Put Bucket请求可以在指定账号下创建一个Bucket。
func (*BucketService) PutACL ¶
func (s *BucketService) PutACL(ctx context.Context, opt *BucketPutACLOptions) (*Response, error)
PutACL 使用API写入Bucket的ACL表,您可以通过Header:"x-cos-acl","x-cos-grant-read", "x-cos-grant-write","x-cos-grant-full-control"传入ACL信息,也可以通过body以XML格式传入ACL信息,
但是只能选择Header和Body其中一种,否则返回冲突。
Put Bucket ACL是一个覆盖操作,传入新的ACL将覆盖原有ACL。只有所有者有权操作。
"x-cos-acl":枚举值为public-read,private;public-read意味这个Bucket有公有读私有写的权限, private意味这个Bucket有私有读写的权限。 "x-cos-grant-read":意味被赋予权限的用户拥有该Bucket的读权限 "x-cos-grant-write":意味被赋予权限的用户拥有该Bucket的写权限 "x-cos-grant-full-control":意味被赋予权限的用户拥有该Bucket的读写权限
func (*BucketService) PutAccelerate ¶
func (s *BucketService) PutAccelerate(ctx context.Context, opt *BucketPutAccelerateOptions) (*Response, error)
func (*BucketService) PutBucketReplication ¶
func (s *BucketService) PutBucketReplication(ctx context.Context, opt *PutBucketReplicationOptions) (*Response, error)
PutBucketReplication https://cloud.tencent.com/document/product/436/19223
func (*BucketService) PutCORS ¶
func (s *BucketService) PutCORS(ctx context.Context, opt *BucketPutCORSOptions) (*Response, error)
PutCORS 实现 Bucket 跨域访问设置,您可以通过传入XML格式的配置文件实现配置,文件大小限制为64 KB。
func (*BucketService) PutDomain ¶
func (s *BucketService) PutDomain(ctx context.Context, opt *BucketPutDomainOptions) (*Response, error)
func (*BucketService) PutEncryption ¶
func (s *BucketService) PutEncryption(ctx context.Context, opt *BucketPutEncryptionOptions) (*Response, error)
func (*BucketService) PutIntelligentTiering ¶
func (s *BucketService) PutIntelligentTiering(ctx context.Context, opt *BucketPutIntelligentTieringOptions) (*Response, error)
func (*BucketService) PutInventory ¶
func (s *BucketService) PutInventory(ctx context.Context, id string, opt *BucketPutInventoryOptions) (*Response, error)
PutBucketInventory https://cloud.tencent.com/document/product/436/33707
func (*BucketService) PutLifecycle ¶
func (s *BucketService) PutLifecycle(ctx context.Context, opt *BucketPutLifecycleOptions) (*Response, error)
PutLifecycle 请求实现设置生命周期管理的功能。您可以通过该请求实现数据的生命周期管理配置和定期删除。 此请求为覆盖操作,上传新的配置文件将覆盖之前的配置文件。生命周期管理对文件和文件夹同时生效。 https://www.qcloud.com/document/product/436/8280
func (*BucketService) PutLogging ¶
func (s *BucketService) PutLogging(ctx context.Context, opt *BucketPutLoggingOptions) (*Response, error)
PutBucketLogging https://cloud.tencent.com/document/product/436/17054
func (*BucketService) PutOrigin ¶
func (s *BucketService) PutOrigin(ctx context.Context, opt *BucketPutOriginOptions) (*Response, error)
func (*BucketService) PutPolicy ¶
func (s *BucketService) PutPolicy(ctx context.Context, opt *BucketPutPolicyOptions) (*Response, error)
func (*BucketService) PutReferer ¶
func (s *BucketService) PutReferer(ctx context.Context, opt *BucketPutRefererOptions) (*Response, error)
func (*BucketService) PutTagging ¶
func (s *BucketService) PutTagging(ctx context.Context, opt *BucketPutTaggingOptions) (*Response, error)
PutTagging 接口实现给用指定Bucket打标签。用来组织和管理相关Bucket。
当该请求设置相同Key名称,不同Value时,会返回400。请求成功,则返回204。
func (*BucketService) PutVersioning ¶
func (s *BucketService) PutVersioning(ctx context.Context, opt *BucketPutVersionOptions) (*Response, error)
PutVersion https://cloud.tencent.com/document/product/436/19889 Status has Suspended\Enabled
func (*BucketService) PutWebsite ¶
func (s *BucketService) PutWebsite(ctx context.Context, opt *BucketPutWebsiteOptions) (*Response, error)
type BucketStatement ¶
type BucketTaggingTag ¶
BucketTaggingTag is the tag of BucketTagging
type CASJobParameters ¶
type CASJobParameters struct {
Tier string `xml:"Tier" header:"-" url:"-"`
}
CASJobParameters support three way: Standard(in 35 hours), Expedited(quick way, in 15 mins), Bulk(in 5-12 hours_
type CIService ¶
type CIService service
func (*CIService) BatchImageAuditing ¶
func (s *CIService) BatchImageAuditing(ctx context.Context, opt *BatchImageAuditingOptions) (*BatchImageAuditingJobResult, *Response, error)
图片批量审核接口
func (*CIService) CreateDocProcessJobs ¶
func (s *CIService) CreateDocProcessJobs(ctx context.Context, opt *CreateDocProcessJobsOptions) (*CreateDocProcessJobsResult, *Response, error)
创建文档预览任务 https://cloud.tencent.com/document/product/436/54056
func (*CIService) CreateMediaJobs ¶
func (s *CIService) CreateMediaJobs(ctx context.Context, opt *CreateMediaJobsOptions) (*CreateMediaJobsResult, *Response, error)
func (*CIService) CreateMultiMediaJobs ¶
func (s *CIService) CreateMultiMediaJobs(ctx context.Context, opt *CreateMultiMediaJobsOptions) (*CreateMultiMediaJobsResult, *Response, error)
func (*CIService) DeleteGuetzli ¶
关闭 Guetzli 压缩 https://cloud.tencent.com/document/product/460/30113
func (*CIService) DescribeDocProcessBuckets ¶
func (s *CIService) DescribeDocProcessBuckets(ctx context.Context, opt *DescribeDocProcessBucketsOptions) (*DescribeDocProcessBucketsResult, *Response, error)
查询文档预览开通状态 https://cloud.tencent.com/document/product/436/54057
func (*CIService) DescribeDocProcessJob ¶
func (s *CIService) DescribeDocProcessJob(ctx context.Context, jobid string) (*DescribeDocProcessJobResult, *Response, error)
查询文档预览任务 https://cloud.tencent.com/document/product/436/54095
func (*CIService) DescribeDocProcessJobs ¶
func (s *CIService) DescribeDocProcessJobs(ctx context.Context, opt *DescribeDocProcessJobsOptions) (*DescribeDocProcessJobsResult, *Response, error)
拉取符合条件的文档预览任务 https://cloud.tencent.com/document/product/436/54096
func (*CIService) DescribeDocProcessQueues ¶
func (s *CIService) DescribeDocProcessQueues(ctx context.Context, opt *DescribeDocProcessQueuesOptions) (*DescribeDocProcessQueuesResult, *Response, error)
查询文档预览队列 https://cloud.tencent.com/document/product/436/54055
func (*CIService) DescribeMediaJob ¶
func (*CIService) DescribeMediaJobs ¶
func (s *CIService) DescribeMediaJobs(ctx context.Context, opt *DescribeMediaJobsOptions) (*DescribeMediaJobsResult, *Response, error)
func (*CIService) DescribeMediaProcessBuckets ¶
func (s *CIService) DescribeMediaProcessBuckets(ctx context.Context, opt *DescribeMediaProcessBucketsOptions) (*DescribeMediaProcessBucketsResult, *Response, error)
媒体bucket接口 https://cloud.tencent.com/document/product/436/48988
func (*CIService) DescribeMediaProcessQueues ¶
func (s *CIService) DescribeMediaProcessQueues(ctx context.Context, opt *DescribeMediaProcessQueuesOptions) (*DescribeMediaProcessQueuesResult, *Response, error)
func (*CIService) DocPreview ¶
func (*CIService) GenerateQRcode ¶
func (s *CIService) GenerateQRcode(ctx context.Context, opt *GenerateQRcodeOptions) (*GenerateQRcodeResult, *Response, error)
func (*CIService) GenerateQRcodeToFile ¶
func (s *CIService) GenerateQRcodeToFile(ctx context.Context, filePath string, opt *GenerateQRcodeOptions) (*GenerateQRcodeResult, *Response, error)
func (*CIService) Get ¶
func (s *CIService) Get(ctx context.Context, name string, operation string, opt *ObjectGetOptions, id ...string) (*Response, error)
基本图片处理 https://cloud.tencent.com/document/product/460/36540 盲水印-下载时添加 https://cloud.tencent.com/document/product/460/19017
func (*CIService) GetAudioAuditingJob ¶
func (s *CIService) GetAudioAuditingJob(ctx context.Context, jobid string) (*GetAudioAuditingJobResult, *Response, error)
音频审核-查询任务 https://cloud.tencent.com/document/product/460/53396
func (*CIService) GetDocumentAuditingJob ¶
func (s *CIService) GetDocumentAuditingJob(ctx context.Context, jobid string) (*GetDocumentAuditingJobResult, *Response, error)
文档审核-查询任务 https://cloud.tencent.com/document/product/436/59382
func (*CIService) GetFaceEffect ¶
func (s *CIService) GetFaceEffect(ctx context.Context, name, effectType string, opt *ObjectGetOptions, id ...string) (*GetFaceEffectResult, *Response, error)
人脸特效 https://cloud.tencent.com/document/product/460/47197#.E8.AF.B7.E6.B1.82
func (*CIService) GetGuetzli ¶
查询 Guetzli 状态 https://cloud.tencent.com/document/product/460/30111
func (*CIService) GetMediaInfo ¶
func (s *CIService) GetMediaInfo(ctx context.Context, name string, opt *ObjectGetOptions, id ...string) (*GetMediaInfoResult, *Response, error)
func (*CIService) GetQRcode ¶
func (s *CIService) GetQRcode(ctx context.Context, name string, cover int, opt *ObjectGetOptions, id ...string) (*GetQRcodeResult, *Response, error)
二维码识别-下载时识别 https://cloud.tencent.com/document/product/436/54070
func (*CIService) GetSnapshot ¶
func (*CIService) GetTextAuditingJob ¶
func (s *CIService) GetTextAuditingJob(ctx context.Context, jobid string) (*GetTextAuditingJobResult, *Response, error)
文本审核-查询任务 https://cloud.tencent.com/document/product/436/56288
func (*CIService) GetVideoAuditingJob ¶
func (s *CIService) GetVideoAuditingJob(ctx context.Context, jobid string) (*GetVideoAuditingJobResult, *Response, error)
视频审核-查询任务 https://cloud.tencent.com/document/product/460/46926
func (*CIService) GetWebpageAuditingJob ¶
func (s *CIService) GetWebpageAuditingJob(ctx context.Context, jobid string) (*GetWebpageAuditingJobResult, *Response, error)
网页审核-查询任务 https://cloud.tencent.com/document/product/436/63959
func (*CIService) ImageAuditing ¶
func (s *CIService) ImageAuditing(ctx context.Context, name string, opt *ImageRecognitionOptions) (*ImageRecognitionResult, *Response, error)
图片审核 支持detect-url等全部参数
func (*CIService) ImageProcess ¶
func (s *CIService) ImageProcess(ctx context.Context, name string, opt *ImageProcessOptions) (*ImageProcessResult, *Response, error)
func (*CIService) ImageRecognition ¶
func (*CIService) Put ¶
func (s *CIService) Put(ctx context.Context, name string, r io.Reader, uopt *ObjectPutOptions) (*ImageProcessResult, *Response, error)
图片持久化处理-上传时处理 https://cloud.tencent.com/document/product/460/18147 盲水印-上传时添加 https://cloud.tencent.com/document/product/460/19017 二维码识别-上传时识别 https://cloud.tencent.com/document/product/460/37513
func (*CIService) PutAudioAuditingJob ¶
func (s *CIService) PutAudioAuditingJob(ctx context.Context, opt *PutAudioAuditingJobOptions) (*PutAudioAuditingJobResult, *Response, error)
音频审核-创建任务 https://cloud.tencent.com/document/product/460/53395
func (*CIService) PutDocumentAuditingJob ¶
func (s *CIService) PutDocumentAuditingJob(ctx context.Context, opt *PutDocumentAuditingJobOptions) (*PutDocumentAuditingJobResult, *Response, error)
文档审核-创建任务 https://cloud.tencent.com/document/product/436/59381
func (*CIService) PutFromFile ¶
func (s *CIService) PutFromFile(ctx context.Context, name string, filePath string, opt *ObjectPutOptions) (*ImageProcessResult, *Response, error)
ci put object from local file
func (*CIService) PutGuetzli ¶
开通 Guetzli 压缩 https://cloud.tencent.com/document/product/460/30112
func (*CIService) PutTextAuditingJob ¶
func (s *CIService) PutTextAuditingJob(ctx context.Context, opt *PutTextAuditingJobOptions) (*PutTextAuditingJobResult, *Response, error)
文本审核-创建任务 https://cloud.tencent.com/document/product/436/56289
func (*CIService) PutVideoAuditingJob ¶
func (s *CIService) PutVideoAuditingJob(ctx context.Context, opt *PutVideoAuditingJobOptions) (*PutVideoAuditingJobResult, *Response, error)
视频审核-创建任务 https://cloud.tencent.com/document/product/460/46427
func (*CIService) PutWebpageAuditingJob ¶
func (s *CIService) PutWebpageAuditingJob(ctx context.Context, opt *PutWebpageAuditingJobOptions) (*PutWebpageAuditingJobResult, *Response, error)
网页审核-创建任务 https://cloud.tencent.com/document/product/436/63958
func (*CIService) UpdateDocProcessQueue ¶
func (s *CIService) UpdateDocProcessQueue(ctx context.Context, opt *UpdateDocProcessQueueOptions) (*UpdateDocProcessQueueResult, *Response, error)
更新文档预览队列 https://cloud.tencent.com/document/product/436/54094
func (*CIService) UpdateMediaProcessQueue ¶
func (s *CIService) UpdateMediaProcessQueue(ctx context.Context, opt *UpdateMediaProcessQueueOptions) (*UpdateMediaProcessQueueResult, *Response, error)
type CSVInputSerialization ¶
type CSVInputSerialization struct { RecordDelimiter string `xml:"RecordDelimiter,omitempty"` FieldDelimiter string `xml:"FieldDelimiter,omitempty"` QuoteCharacter string `xml:"QuoteCharacter,omitempty"` QuoteEscapeCharacter string `xml:"QuoteEscapeCharacter,omitempty"` AllowQuotedRecordDelimiter string `xml:"AllowQuotedRecordDelimiter,omitempty"` FileHeaderInfo string `xml:"FileHeaderInfo,omitempty"` Comments string `xml:"Comments,omitempty"` }
type CSVOutputSerialization ¶
type CSVOutputSerialization struct { QuoteFields string `xml:"QuoteFields,omitempty"` RecordDelimiter string `xml:"RecordDelimiter,omitempty"` FieldDelimiter string `xml:"FieldDelimiter,omitempty"` QuoteCharacter string `xml:"QuoteCharacter,omitempty"` QuoteEscapeCharacter string `xml:"QuoteEscapeCharacter,omitempty"` }
type CVMCredentialsTransport ¶
type CVMCredentialsTransport struct { RoleName string Transport http.RoundTripper // contains filtered or unexported fields }
func (*CVMCredentialsTransport) GetCredential ¶
func (t *CVMCredentialsTransport) GetCredential() (string, string, string, error)
func (*CVMCredentialsTransport) GetRoles ¶
func (t *CVMCredentialsTransport) GetRoles() ([]string, error)
func (*CVMCredentialsTransport) UpdateCredential ¶
type CVMSecurityCredentials ¶
type Chunk ¶
func SplitFileIntoChunks ¶
type Client ¶
type Client struct { Host string UserAgent string BaseURL *BaseURL Service *ServiceService Bucket *BucketService Object *ObjectService Batch *BatchService CI *CIService Conf *Config // contains filtered or unexported fields }
Client is a client manages communication with the COS API.
func (*Client) GetCredential ¶
func (c *Client) GetCredential() *Credential
type CodeLocation ¶
type CodeLocation struct {
Point []string `xml:"Point,omitempty"`
}
type CompleteMultipartUploadOptions ¶
type CompleteMultipartUploadOptions struct { XMLName xml.Name `xml:"CompleteMultipartUpload" header:"-" url:"-"` Parts []Object `xml:"Part" header:"-" url:"-"` XOptionHeader *http.Header `header:"-,omitempty" xml:"-" url:"-"` }
CompleteMultipartUploadOptions is the option of CompleteMultipartUpload
func CloneCompleteMultipartUploadOptions ¶
func CloneCompleteMultipartUploadOptions(opt *CompleteMultipartUploadOptions) *CompleteMultipartUploadOptions
type CompleteMultipartUploadResult ¶
type CompleteMultipartUploadResult struct { XMLName xml.Name `xml:"CompleteMultipartUploadResult"` Location string Bucket string Key string ETag string }
CompleteMultipartUploadResult is the result CompleteMultipartUpload
type ConcatFragment ¶
type ConcatTemplate ¶
type ConcatTemplate struct { ConcatFragment []ConcatFragment `xml:"ConcatFragment,omitempty"` Audio *Audio `xml:"Audio,omitempty"` Video *Video `xml:"Video,omitempty"` Container *Container `xml:"Container,omitempty"` Index string `xml:"Index,omitempty"` }
type Config ¶
type Config struct { EnableCRC bool RequestBodyClose bool RetryOpt RetryOptions }
type CopyJobs ¶
type CopyJobs struct { Name string UploadId string RetryTimes int Chunk Chunk Opt *ObjectCopyPartOptions }
type CopyPartResult ¶
type CopyPartResult struct { XMLName xml.Name `xml:"CopyPartResult"` ETag string LastModified string }
CopyPartResult is the result CopyPart
type CopyResults ¶
type CreateDocProcessJobsOptions ¶
type CreateDocProcessJobsOptions struct { XMLName xml.Name `xml:"Request"` Tag string `xml:"Tag,omitempty"` Input *DocProcessJobInput `xml:"Input,omitempty"` Operation *DocProcessJobOperation `xml:"Operation,omitempty"` QueueId string `xml:"QueueId,omitempty"` }
type CreateDocProcessJobsResult ¶
type CreateDocProcessJobsResult struct { XMLName xml.Name `xml:"Response"` JobsDetail DocProcessJobDetail `xml:"JobsDetail,omitempty"` }
type CreateMediaJobsOptions ¶
type CreateMediaJobsResult ¶
type CreateMediaJobsResult struct { XMLName xml.Name `xml:"Response"` JobsDetail *MediaProcessJobDetail `xml:"JobsDetail,omitempty"` }
type CreateMultiMediaJobsResult ¶
type CreateMultiMediaJobsResult struct { XMLName xml.Name `xml:"Response"` JobsDetail []MediaProcessJobDetail `xml:"JobsDetail,omitempty"` }
type Credential ¶
type DefaultProgressListener ¶
type DefaultProgressListener struct { }
func (*DefaultProgressListener) ProgressChangedCallback ¶
func (l *DefaultProgressListener) ProgressChangedCallback(event *ProgressEvent)
type DescribeDocProcessBucketsResult ¶
type DescribeDocProcessBucketsResult struct { XMLName xml.Name `xml:"Response"` RequestId string `xml:"RequestId,omitempty"` TotalCount int `xml:"TotalCount,omitempty"` PageNumber int `xml:"PageNumber,omitempty"` PageSize int `xml:"PageSize,omitempty"` DocBucketList []DocProcessBucket `xml:"DocBucketList,omitempty"` }
type DescribeDocProcessJobResult ¶
type DescribeDocProcessJobResult struct { XMLName xml.Name `xml:"Response"` JobsDetail *DocProcessJobDetail `xml:"JobsDetail,omitempty"` NonExistJobIds string `xml:"NonExistJobIds,omitempty"` }
type DescribeDocProcessJobsOptions ¶
type DescribeDocProcessJobsOptions struct { QueueId string `url:"queueId,omitempty"` Tag string `url:"tag,omitempty"` OrderByTime string `url:"orderByTime,omitempty"` NextToken string `url:"nextToken,omitempty"` Size int `url:"size,omitempty"` States string `url:"states,omitempty"` StartCreationTime string `url:"startCreationTime,omitempty"` EndCreationTime string `url:"endCreationTime,omitempty"` }
type DescribeDocProcessJobsResult ¶
type DescribeDocProcessJobsResult struct { XMLName xml.Name `xml:"Response"` JobsDetail []DocProcessJobDetail `xml:"JobsDetail,omitempty"` NextToken string `xml:"NextToken,omitempty"` }
type DescribeDocProcessQueuesResult ¶
type DescribeDocProcessQueuesResult struct { XMLName xml.Name `xml:"Response"` RequestId string `xml:"RequestId,omitempty"` TotalCount int `xml:"TotalCount,omitempty"` PageNumber int `xml:"PageNumber,omitempty"` PageSize int `xml:"PageSize,omitempty"` QueueList []DocProcessQueue `xml:"QueueList,omitempty"` NonExistPIDs []string `xml:"NonExistPIDs,omitempty"` }
type DescribeMediaJobsOptions ¶
type DescribeMediaJobsOptions struct { QueueId string `url:"queueId,omitempty"` Tag string `url:"tag,omitempty"` OrderByTime string `url:"orderByTime,omitempty"` NextToken string `url:"nextToken,omitempty"` Size int `url:"size,omitempty"` States string `url:"states,omitempty"` StartCreationTime string `url:"startCreationTime,omitempty"` EndCreationTime string `url:"endCreationTime,omitempty"` }
type DescribeMediaJobsResult ¶
type DescribeMediaJobsResult struct { XMLName xml.Name `xml:"Response"` JobsDetail []MediaProcessJobDetail `xml:"JobsDetail,omitempty"` NextToken string `xml:"NextToken,omitempty"` }
type DescribeMediaProcessBucketsResult ¶
type DescribeMediaProcessBucketsResult struct { XMLName xml.Name `xml:"Response"` RequestId string `xml:"RequestId,omitempty"` TotalCount int `xml:"TotalCount,omitempty"` PageNumber int `xml:"PageNumber,omitempty"` PageSize int `xml:"PageSize,omitempty"` MediaBucketList []MediaProcessBucket `xml:"MediaBucketList,omitempty"` }
type DescribeMediaProcessJobResult ¶
type DescribeMediaProcessJobResult struct { XMLName xml.Name `xml:"Response"` JobsDetail *MediaProcessJobDetail `xml:"JobsDetail,omitempty"` NonExistJobIds string `xml:"NonExistJobIds,omitempty"` }
type DescribeMediaProcessQueuesResult ¶
type DescribeMediaProcessQueuesResult struct { XMLName xml.Name `xml:"Response"` RequestId string `xml:"RequestId,omitempty"` TotalCount int `xml:"TotalCount,omitempty"` PageNumber int `xml:"PageNumber,omitempty"` PageSize int `xml:"PageSize,omitempty"` QueueList []MediaProcessQueue `xml:"QueueList,omitempty"` NonExistPIDs []string `xml:"NonExistPIDs,omitempty"` }
type DiscardReadCloser ¶
type DiscardReadCloser struct { RC io.ReadCloser Discard int }
func (*DiscardReadCloser) Close ¶
func (drc *DiscardReadCloser) Close() error
type DocPreviewOptions ¶
type DocPreviewOptions struct { SrcType string `url:"srcType,omitempty"` Page int `url:"page,omitempty"` ImageParams string `url:"ImageParams,omitempty"` Sheet int `url:"sheet,omitempty"` DstType string `url:"dstType,omitempty"` Password string `url:"password,omitempty"` Comment int `url:"comment,omitempty"` ExcelPaperDirection int `url:"excelPaperDirection,omitempty"` Quality int `url:"quality,omitempty"` Zoom int `url:"zoom,omitempty"` }
type DocProcessBucket ¶
type DocProcessJobDetail ¶
type DocProcessJobDetail struct { Code string `xml:"Code,omitempty"` Message string `xml:"Message,omitempty"` JobId string `xml:"JobId,omitempty"` Tag string `xml:"Tag,omitempty"` State string `xml:"State,omitempty"` CreationTime string `xml:"CreationTime,omitempty"` QueueId string `xml:"QueueId,omitempty"` Input *DocProcessJobInput `xml:"Input,omitempty"` Operation *DocProcessJobOperation `xml:"Operation,omitempty"` }
type DocProcessJobDocProcess ¶
type DocProcessJobDocProcess struct { SrcType string `xml:"SrcType,omitempty"` TgtType string `xml:"TgtType,omitempty"` SheetId int `xml:"SheetId,omitempty"` StartPage int `xml:"StartPage,omitempty"` EndPage int `xml:"EndPage,omitempty"` ImageParams string `xml:"ImageParams,omitempty"` DocPassword string `xml:"DocPassword,omitempty"` Comments int `xml:"Comments,omitempty"` PaperDirection int `xml:"PaperDirection,omitempty"` Quality int `xml:"Quality,omitempty"` Zoom int `xml:"Zoom,omitempty"` }
type DocProcessJobDocProcessResult ¶
type DocProcessJobDocProcessResult struct { FailPageCount int `xml:",omitempty"` SuccPageCount int `xml:"SuccPageCount,omitempty"` TaskId string `xml:"TaskId,omitempty"` TgtType string `xml:"TgtType,omitempty"` TotalPageCount int `xml:"TotalPageCount,omitempty"` TotalSheetCount int `xml:"TotalSheetCount,omitempty"` PageInfo []struct { PageNo int `xml:"PageNo,omitempty"` TgtUri string `xml:"TgtUri,omitempty"` XSheetPics int `xml:"X-SheetPics,omitempty"` PicIndex int `xml:"PicIndex,omitempty"` PicNum int `xml:"PicNum,omitempty"` } `xml:"PageInfo,omitempty"` }
type DocProcessJobInput ¶
type DocProcessJobInput struct {
Object string `xml:"Object,omitempty"`
}
type DocProcessJobOperation ¶
type DocProcessJobOperation struct { Output *DocProcessJobOutput `xml:"Output,omitempty"` DocProcess *DocProcessJobDocProcess `xml:"DocProcess,omitempty"` DocProcessResult *DocProcessJobDocProcessResult `xml:"DocProcessResult,omitempty"` }
type DocProcessJobOutput ¶
type DocProcessQueue ¶
type DocProcessQueue struct { QueueId string `xml:"QueueId,omitempty"` Name string `xml:"Name,omitempty"` State string `xml:"State,omitempty"` MaxSize int `xml:"MaxSize,omitempty"` MaxConcurrent int `xml:"MaxConcurrent,omitempty"` UpdateTime string `xml:"UpdateTime,omitempty"` CreateTime string `xml:"CreateTime,omitempty"` NotifyConfig *DocProcessQueueNotifyConfig `xml:"NotifyConfig,omitempty"` }
type DocumentAuditingJobConf ¶
type DocumentAuditingJobConf struct { DetectType string `xml:",omitempty"` Callback string `xml:",omitempty"` BizType string `xml:",omitempty"` }
DocumentAuditingJobConf is the config of PutDocumentAuditingJobOptions
type DocumentAuditingJobDetail ¶
type DocumentAuditingJobDetail struct { Code string `xml:",omitempty"` Message string `xml:",omitempty"` JobId string `xml:",omitempty"` State string `xml:",omitempty"` CreationTime string `xml:",omitempty"` Object string `xml:",omitempty"` Url string `xml:",omitempty"` DataId string `xml:",omitempty"` PageCount int `xml:",omitempty"` Label string `xml:",omitempty"` Suggestion int `xml:",omitempty"` Labels *DocumentResultInfo `xml:",omitempty"` PageSegment *DocumentPageSegmentInfo `xml:",omitempty"` }
DocumentAuditingJobDetail is the detail of GetDocumentAuditingJobResult
type DocumentPageSegmentInfo ¶
type DocumentPageSegmentInfo struct {
Results []DocumentPageSegmentResultResult `xml:",omitempty"`
}
DocumentPageSegmentInfo
type DocumentPageSegmentResultResult ¶
type DocumentPageSegmentResultResult struct { Url string `xml:",omitempty"` Text string `xml:",omitempty"` PageNumber int `xml:",omitempty"` SheetNumber int `xml:",omitempty"` Label string `xml:",omitempty"` Suggestion int `xml:",omitempty"` PornInfo *RecognitionInfo `xml:",omitempty"` TerrorismInfo *RecognitionInfo `xml:",omitempty"` PoliticsInfo *RecognitionInfo `xml:",omitempty"` AdsInfo *RecognitionInfo `xml:",omitempty"` }
DocumentPageSegmentResultResult
type DocumentResultInfo ¶
type DocumentResultInfo struct { PornInfo *RecognitionInfo `xml:",omitempty"` TerrorismInfo *RecognitionInfo `xml:",omitempty"` PoliticsInfo *RecognitionInfo `xml:",omitempty"` AdsInfo *RecognitionInfo `xml:",omitempty"` }
DocumentResultInfo
type DownloadedBlock ¶
type ErrorDocument ¶
type ErrorDocument struct {
Key string `xml:"Key,omitempty"`
}
type ErrorFrame ¶
func (*ErrorFrame) Error ¶
func (e *ErrorFrame) Error() string
type ErrorResponse ¶
type ErrorResponse struct { XMLName xml.Name `xml:"Error"` Response *http.Response `xml:"-"` Code string Message string Resource string RequestID string `header:"x-cos-request-id,omitempty" url:"-" xml:"RequestId,omitempty"` TraceID string `xml:"TraceId,omitempty"` }
ErrorResponse 包含 API 返回的错误信息
https://www.qcloud.com/document/product/436/7730
func IsCOSError ¶
func IsCOSError(e error) (*ErrorResponse, bool)
type FixedLengthReader ¶
type GenerateQRcodeOptions ¶
type GenerateQRcodeResult ¶
type GetAudioAuditingJobResult ¶
type GetAudioAuditingJobResult struct { XMLName xml.Name `xml:"Response"` JobsDetail *AudioAuditingJobDetail `xml:",omitempty"` RequestId string `xml:",omitempty"` }
GetAudioAuditingJobResult is the result of GetAudioAuditingJob
type GetBucketReplicationResult ¶
type GetBucketReplicationResult PutBucketReplicationOptions
GetBucketReplicationResult is the result of GetBucketReplication
type GetDocumentAuditingJobResult ¶
type GetDocumentAuditingJobResult struct { XMLName xml.Name `xml:"Response"` JobsDetail *DocumentAuditingJobDetail `xml:",omitempty"` RequestId string `xml:",omitempty"` }
GetDocumentAuditingJobResult is the result of GetDocumentAuditingJob
type GetFaceEffectResult ¶
type GetFetchTaskResult ¶
type GetFetchTaskResult struct { Code int `json:"code,omitempty"` Message string `json:"message,omitempty"` RequestId string `json:"request_id,omitempty"` Data struct { Code string `json:"code,omitempty"` Message string `json:"msg,omitempty"` Percent int `json:"percent,omitempty"` Status string `json:"status,omitempty"` } `json:"data,omitempty"` }
type GetGuetzliResult ¶
type GetMediaInfoResult ¶
type GetMediaInfoResult struct { XMLName xml.Name `xml:"Response"` MediaInfo struct { Format struct { Bitrate float32 `xml:"Bitrate"` Duration float32 `xml:"Duration"` FormatLongName string `xml:"FormatLongName"` FormatName string `xml:"FormatName"` NumProgram int `xml:"NumProgram"` NumStream int `xml:"NumStream"` Size int `xml:"Size"` StartTime float32 `xml:"StartTime"` } `xml:"Format"` Stream struct { Audio []struct { Index int `xml:"Index"` CodecName string `xml:"CodecName"` CodecLongName string `xml:"CodecLongName"` CodecTimeBase string `xml:"CodecTimeBase"` CodecTagString string `xml:"CodecTagString"` CodecTag string `xml:"CodecTag"` SampleFmt string `xml:"SampleFmt"` SampleRate int `xml:"SampleRate"` Channel int `xml:"Channel"` ChannelLayout string `xml:"ChannelLayout"` Timebase string `xml:"Timebase"` StartTime float32 `xml:"StartTime"` Duration float32 `xml:"Duration"` Bitrate float32 `xml:"Bitrate"` Language string `xml:"Language"` } `xml:"Audio"` Subtitle struct { Index int `xml:"Index"` Language string `xml:"Language"` } `xml:"Subtitle"` Video struct { Index int `xml:"Index"` CodecName string `xml:"CodecName"` CodecLongName string `xml:"CodecLongName"` CodecTimeBase string `xml:"CodecTimeBase"` CodecTagString string `xml:"CodecTagString"` CodecTag string `xml:"CodecTag"` Profile string `xml:"Profile"` Height int `xml:"Height"` Width int `xml:"Width"` HasBFrame int `xml:"HasBFrame"` RefFrames int `xml:"RefFrames"` Sar string `xml:"Sar"` Dar string `xml:"Dar"` PixFormat string `xml:"PixFormat"` FieldOrder string `xml:"FieldOrder"` Level int `xml:"Level"` Fps float32 `xml:"Fps"` AvgFps string `xml:"AvgFps"` Timebase string `xml:"Timebase"` StartTime float32 `xml:"StartTime"` Duration float32 `xml:"Duration"` Bitrate float32 `xml:"Bitrate"` NumFrames int `xml:"NumFrames"` Language string `xml:"Language"` } `xml:"Video"` } `xml:"Stream"` } `xml:"MediaInfo"` }
type GetQRcodeResult ¶
type GetQRcodeResult struct { XMLName xml.Name `xml:"Response"` CodeStatus int `xml:"CodeStatus,omitempty"` QRcodeInfo *QRcodeInfo `xml:"QRcodeInfo,omitempty"` ResultImage string `xml:"ResultImage,omitempty"` }
type GetSnapshotOptions ¶
type GetTextAuditingJobResult ¶
type GetTextAuditingJobResult struct { XMLName xml.Name `xml:"Response"` JobsDetail *TextAuditingJobDetail `xml:",omitempty"` RequestId string `xml:",omitempty"` }
GetTextAuditingJobResult is the result of GetTextAuditingJob
type GetVideoAuditingJobResult ¶
type GetVideoAuditingJobResult struct { XMLName xml.Name `xml:"Response"` JobsDetail *AuditingJobDetail `xml:",omitempty"` RequestId string `xml:",omitempty"` }
GetVideoAuditingJobResult is the result of GetVideoAuditingJob
type GetVideoAuditingJobSnapshot ¶
type GetVideoAuditingJobSnapshot struct { Url string `xml:",omitempty"` Text string `xml:",omitempty"` SnapshotTime int `xml:",omitempty"` Label string `xml:",omitempty"` Result int `xml:",omitempty"` PornInfo *RecognitionInfo `xml:",omitempty"` TerrorismInfo *RecognitionInfo `xml:",omitempty"` PoliticsInfo *RecognitionInfo `xml:",omitempty"` AdsInfo *RecognitionInfo `xml:",omitempty"` }
GetVideoAuditingJobSnapshot is the snapshot result of AuditingJobDetail
type GetWebpageAuditingJobResult ¶
type GetWebpageAuditingJobResult struct { XMLName xml.Name `xml:"Response"` JobsDetail *WebpageAuditingJobDetail `xml:",omitempty"` }
GetWebpageAuditingJobResult is the result of GetWebpageAuditingJob
type ImageAuditingInputOptions ¶
type ImageAuditingInputOptions struct { DataId string `xml:",omitempty"` Object string `xml:",omitempty"` Url string `xml:",omitempty"` Interval int `xml:",omitempty"` MaxFrames int `xml:",omitempty"` }
ImageAuditingInputOptions is the option of BatchImageAuditingOptions
type ImageAuditingJobConf ¶
type ImageAuditingJobConf struct { DetectType string `xml:",omitempty"` BizType string `xml:",omitempty"` }
ImageAuditingJobConf is the config of BatchImageAuditingOptions
type ImageAuditingResult ¶
type ImageAuditingResult struct { Code string `xml:",omitempty"` Message string `xml:",omitempty"` DataId string `xml:",omitempty"` Object string `xml:",omitempty"` Url string `xml:",omitempty"` Text string `xml:",omitempty"` Label string `xml:",omitempty"` Result int `xml:",omitempty"` Score int `xml:",omitempty"` SubLabel string `xml:",omitempty"` PornInfo *RecognitionInfo `xml:",omitempty"` TerrorismInfo *RecognitionInfo `xml:",omitempty"` PoliticsInfo *RecognitionInfo `xml:",omitempty"` AdsInfo *RecognitionInfo `xml:",omitempty"` }
ImageRecognitionResult is the result of BatchImageAuditingJobResult
type ImageProcessOptions ¶
type ImageProcessOptions = PicOperations
type ImageProcessResult ¶
type ImageProcessResult struct { XMLName xml.Name `xml:"UploadResult"` OriginalInfo *PicOriginalInfo `xml:"OriginalInfo,omitempty"` ProcessResults *PicProcessObject `xml:"ProcessResults>Object,omitempty"` }
type ImageRecognitionOptions ¶
type ImageRecognitionOptions struct { CIProcess string `url:"ci-process,omitempty"` DetectType string `url:"detect-type,omitempty"` DetectUrl string `url:"detect-url,omitempty"` Interval int `url:"interval,omitempty"` MaxFrames int `url:"max-frames,omitempty"` BizType string `url:"biz-type,omitempty"` }
ImageRecognitionOptions is the option of ImageAuditing
type ImageRecognitionResult ¶
type ImageRecognitionResult struct { XMLName xml.Name `xml:"RecognitionResult"` Text string `xml:"Text,omitempty"` Label string `xml:"Label,omitempty"` Result int `xml:"Result,omitempty"` Score int `xml:"Score,omitempty"` SubLabel string `xml:"SubLabel,omitempty"` PornInfo *RecognitionInfo `xml:"PornInfo,omitempty"` TerroristInfo *RecognitionInfo `xml:"TerroristInfo,omitempty"` PoliticsInfo *RecognitionInfo `xml:"PoliticsInfo,omitempty"` AdsInfo *RecognitionInfo `xml:"AdsInfo,omitempty"` }
ImageRecognitionResult is the result of ImageRecognition/ImageAuditing
type InitiateMultipartUploadOptions ¶
type InitiateMultipartUploadOptions struct { *ACLHeaderOptions *ObjectPutHeaderOptions }
InitiateMultipartUploadOptions is the option of InitateMultipartUpload
func CloneInitiateMultipartUploadOptions ¶
func CloneInitiateMultipartUploadOptions(opt *InitiateMultipartUploadOptions) *InitiateMultipartUploadOptions
func CopyOptionsToMulti ¶
func CopyOptionsToMulti(opt *ObjectCopyOptions) *InitiateMultipartUploadOptions
type InitiateMultipartUploadResult ¶
type InitiateMultipartUploadResult struct { XMLName xml.Name `xml:"InitiateMultipartUploadResult"` Bucket string Key string UploadID string `xml:"UploadId"` }
InitiateMultipartUploadResult is the result of InitateMultipartUpload
type JSONInputSerialization ¶
type JSONInputSerialization struct {
Type string `xml:"Type,omitempty"`
}
type JSONOutputSerialization ¶
type JSONOutputSerialization struct {
RecordDelimiter string `xml:"RecordDelimiter,omitempty"`
}
type Jobs ¶
type Jobs struct { Name string UploadId string FilePath string RetryTimes int VersionId []string Chunk Chunk Data io.Reader Opt *ObjectUploadPartOptions DownOpt *ObjectGetOptions }
jobs
type LimitedReadCloser ¶
type LimitedReadCloser struct {
io.LimitedReader
}
func (*LimitedReadCloser) Close ¶
func (lc *LimitedReadCloser) Close() error
type ListBucketInventoryConfigResult ¶
type ListBucketInventoryConfigResult struct { XMLName xml.Name `xml:"ListInventoryConfigurationResult"` InventoryConfigurations []BucketListInventoryConfiguartion `xml:"InventoryConfiguration,omitempty"` IsTruncated bool `xml:"IsTruncated,omitempty"` ContinuationToken string `xml:"ContinuationToken,omitempty"` NextContinuationToken string `xml:"NextContinuationToken,omitempty"` }
ListBucketInventoryConfigResult result of ListBucketInventoryConfiguration
type ListMultipartUploadsOptions ¶
type ListMultipartUploadsOptions struct { Delimiter string `url:"delimiter,omitempty"` EncodingType string `url:"encoding-type,omitempty"` Prefix string `url:"prefix,omitempty"` MaxUploads int `url:"max-uploads,omitempty"` KeyMarker string `url:"key-marker,omitempty"` UploadIDMarker string `url:"upload-id-marker,omitempty"` }
ListMultipartUploadsOptions is the option of ListMultipartUploads
type ListMultipartUploadsResult ¶
type ListMultipartUploadsResult struct { XMLName xml.Name `xml:"ListMultipartUploadsResult"` Bucket string `xml:"Bucket"` EncodingType string `xml:"Encoding-Type"` KeyMarker string UploadIDMarker string `xml:"UploadIdMarker"` NextKeyMarker string NextUploadIDMarker string `xml:"NextUploadIdMarker"` MaxUploads int IsTruncated bool Uploads []struct { Key string UploadID string `xml:"UploadId"` StorageClass string Initiator *Initiator Owner *Owner Initiated string } `xml:"Upload,omitempty"` Prefix string Delimiter string `xml:"delimiter,omitempty"` CommonPrefixes []string `xml:"CommonPrefixs>Prefix,omitempty"` }
ListMultipartUploadsResult is the result of ListMultipartUploads
type ListUploadsResultUpload ¶
type ListVersionsResultVersion ¶
type ListVersionsResultVersion struct { Key string `xml:"Key,omitempty"` VersionId string `xml:"VersionId,omitempty"` IsLatest bool `xml:"IsLatest,omitempty"` LastModified string `xml:"LastModified,omitempty"` ETag string `xml:"ETag,omitempty"` Size int `xml:"Size,omitempty"` StorageClass string `xml:"StorageClass,omitempty"` Owner *Owner `xml:"Owner,omitempty"` }
type Location ¶
type Location struct { X float64 `xml:"X,omitempty"` // 左上角横坐标 Y float64 `xml:"Y,omitempty"` // 左上角纵坐标 Width float64 `xml:"Width,omitempty"` // 宽度 Height float64 `xml:"Height,omitempty"` // 高度 Rotate float64 `xml:"Rotate,omitempty"` // 检测框的旋转角度 }
Location
type MediaProcessBucket ¶
type MediaProcessJobDetail ¶
type MediaProcessJobDetail struct { Code string `xml:"Code,omitempty"` Message string `xml:"Message,omitempty"` JobId string `xml:"JobId,omitempty"` Tag string `xml:"Tag,omitempty"` State string `xml:"State,omitempty"` CreationTime string `xml:"CreationTime,omitempty"` QueueId string `xml:"QueueId,omitempty"` Input *JobInput `xml:"Input,omitempty"` Operation *MediaProcessJobOperation `xml:"Operation,omitempty"` }
type MediaProcessJobOperation ¶
type MediaProcessJobOperation struct { Tag string `xml:"Tag,omitempty"` Output *JobOutput `xml:"Output,omitempty"` Transcode *Transcode `xml:"Transcode,omitempty"` Watermark *Watermark `xml:"Watermark,omitempty"` TemplateId string `xml:"TemplateId,omitempty"` WatermarkTemplateId []string `xml:"WatermarkTemplateId,omitempty"` ConcatTemplate *ConcatTemplate `xml:"ConcatTemplate,omitempty"` Snapshot *Snapshot `xml:"Snapshot,omitempty"` Animation *Animation `xml:"Animation,omitempty"` Segment *Segment `xml:"Segment,omitempty"` }
type MediaProcessJobsNotifyBody ¶
type MediaProcessJobsNotifyBody struct { XMLName xml.Name `xml:"Response"` EventName string `xml:"EventName"` JobsDetail struct { Code string `xml:"Code"` CreationTime string `xml:"CreationTime"` EndTime string `xml:"EndTime"` Input struct { BucketId string `xml:"BucketId"` Object string `xml:"Object"` Region string `xml:"Region"` } `xml:"Input"` JobId string `xml:"JobId"` Message string `xml:"Message"` Operation struct { MediaInfo struct { Format struct { Text string `xml:",chardata"` Bitrate string `xml:"Bitrate"` Duration string `xml:"Duration"` FormatLongName string `xml:"FormatLongName"` FormatName string `xml:"FormatName"` NumProgram string `xml:"NumProgram"` NumStream string `xml:"NumStream"` Size string `xml:"Size"` StartTime string `xml:"StartTime"` } `xml:"Format"` Stream struct { Audio []struct { Bitrate string `xml:"Bitrate"` Channel string `xml:"Channel"` ChannelLayout string `xml:"ChannelLayout"` CodecLongName string `xml:"CodecLongName"` CodecName string `xml:"CodecName"` CodecTag string `xml:"CodecTag"` CodecTagString string `xml:"CodecTagString"` CodecTimeBase string `xml:"CodecTimeBase"` Duration string `xml:"Duration"` Index string `xml:"Index"` Language string `xml:"Language"` SampleFmt string `xml:"SampleFmt"` SampleRate string `xml:"SampleRate"` StartTime string `xml:"StartTime"` Timebase string `xml:"Timebase"` } `xml:"Audio"` Subtitle string `xml:"Subtitle"` Video []struct { AvgFps string `xml:"AvgFps"` Bitrate string `xml:"Bitrate"` CodecLongName string `xml:"CodecLongName"` CodecName string `xml:"CodecName"` CodecTag string `xml:"CodecTag"` CodecTagString string `xml:"CodecTagString"` CodecTimeBase string `xml:"CodecTimeBase"` Dar string `xml:"Dar"` Duration string `xml:"Duration"` Fps string `xml:"Fps"` HasBFrame string `xml:"HasBFrame"` Height string `xml:"Height"` Index string `xml:"Index"` Language string `xml:"Language"` Level string `xml:"Level"` NumFrames string `xml:"NumFrames"` PixFormat string `xml:"PixFormat"` Profile string `xml:"Profile"` RefFrames string `xml:"RefFrames"` Rotation string `xml:"Rotation"` Sar string `xml:"Sar"` StartTime string `xml:"StartTime"` Timebase string `xml:"Timebase"` Width string `xml:"Width"` } `xml:"Video"` } `xml:"Stream"` } `xml:"MediaInfo"` MediaResult struct { OutputFile struct { Bucket string `xml:"Bucket"` ObjectName []string `xml:"ObjectName"` ObjectPrefix string `xml:"ObjectPrefix"` Region string `xml:"Region"` } `xml:"OutputFile"` } `xml:"MediaResult"` Output struct { Bucket string `xml:"Bucket"` Object string `xml:"Object"` Region string `xml:"Region"` } `xml:"Output"` TemplateId string `xml:"TemplateId"` TemplateName string `xml:"TemplateName"` } `xml:"Operation"` QueueId string `xml:"QueueId"` StartTime string `xml:"StartTime"` State string `xml:"State"` Tag string `xml:"Tag"` } `xml:"JobsDetail"` }
type MediaProcessQueue ¶
type MediaProcessQueue struct { QueueId string `xml:"QueueId,omitempty"` Name string `xml:"Name,omitempty"` State string `xml:"State,omitempty"` MaxSize int `xml:"MaxSize,omitempty"` MaxConcurrent int `xml:"MaxConcurrent,omitempty"` UpdateTime string `xml:"UpdateTime,omitempty"` CreateTime string `xml:"CreateTime,omitempty"` NotifyConfig *MediaProcessQueueNotifyConfig `xml:"NotifyConfig,omitempty"` }
type MultiCopyOptions ¶
type MultiCopyOptions struct { OptCopy *ObjectCopyOptions PartSize int64 ThreadPoolSize int // contains filtered or unexported fields }
type MultiDownloadCPInfo ¶
type MultiDownloadCPInfo struct { Size int64 `json:"contentLength,omitempty"` ETag string `json:"eTag,omitempty"` CRC64 string `json:"crc64ecma,omitempty"` LastModified string `json:"lastModified,omitempty"` DownloadedBlocks []DownloadedBlock `json:"downloadedBlocks,omitempty"` }
type MultiDownloadOptions ¶
type MultiUploadOptions ¶
type MultiUploadOptions struct { OptIni *InitiateMultipartUploadOptions PartSize int64 ThreadPoolSize int CheckPoint bool DisableChecksum bool }
MultiUploadOptions is the option of the multiupload, ThreadPoolSize default is one
type Object ¶
type Object struct { Key string `xml:",omitempty"` ETag string `xml:",omitempty"` Size int64 `xml:",omitempty"` PartNumber int `xml:",omitempty"` LastModified string `xml:",omitempty"` StorageClass string `xml:",omitempty"` Owner *Owner `xml:",omitempty"` VersionId string `xml:",omitempty"` }
Object is the meta info of the object
type ObjectCopyHeaderOptions ¶
type ObjectCopyHeaderOptions struct { // When use replace directive to update meta infos CacheControl string `header:"Cache-Control,omitempty" url:"-"` ContentDisposition string `header:"Content-Disposition,omitempty" url:"-"` ContentEncoding string `header:"Content-Encoding,omitempty" url:"-"` ContentLanguage string `header:"Content-Language,omitempty" url:"-"` ContentType string `header:"Content-Type,omitempty" url:"-"` Expires string `header:"Expires,omitempty" url:"-"` Expect string `header:"Expect,omitempty" url:"-"` XCosMetadataDirective string `header:"x-cos-metadata-directive,omitempty" url:"-" xml:"-"` XCosCopySourceIfModifiedSince string `header:"x-cos-copy-source-If-Modified-Since,omitempty" url:"-" xml:"-"` XCosCopySourceIfUnmodifiedSince string `header:"x-cos-copy-source-If-Unmodified-Since,omitempty" url:"-" xml:"-"` XCosCopySourceIfMatch string `header:"x-cos-copy-source-If-Match,omitempty" url:"-" xml:"-"` XCosCopySourceIfNoneMatch string `header:"x-cos-copy-source-If-None-Match,omitempty" url:"-" xml:"-"` XCosStorageClass string `header:"x-cos-storage-class,omitempty" url:"-" xml:"-"` // 自定义的 x-cos-meta-* header XCosMetaXXX *http.Header `header:"x-cos-meta-*,omitempty" url:"-"` XCosCopySource string `header:"x-cos-copy-source" url:"-" xml:"-"` XCosServerSideEncryption string `header:"x-cos-server-side-encryption,omitempty" url:"-" xml:"-"` // SSE-C XCosSSECustomerAglo string `header:"x-cos-server-side-encryption-customer-algorithm,omitempty" url:"-" xml:"-"` XCosSSECustomerKey string `header:"x-cos-server-side-encryption-customer-key,omitempty" url:"-" xml:"-"` XCosSSECustomerKeyMD5 string `header:"x-cos-server-side-encryption-customer-key-MD5,omitempty" url:"-" xml:"-"` XCosCopySourceSSECustomerAglo string `header:"x-cos-copy-source-server-side-encryption-customer-algorithm,omitempty" url:"-" xml:"-"` XCosCopySourceSSECustomerKey string `header:"x-cos-copy-source-server-side-encryption-customer-key,omitempty" url:"-" xml:"-"` XCosCopySourceSSECustomerKeyMD5 string `header:"x-cos-copy-source-server-side-encryption-customer-key-MD5,omitempty" url:"-" xml:"-"` //兼容其他自定义头部 XOptionHeader *http.Header `header:"-,omitempty" url:"-" xml:"-"` }
ObjectCopyHeaderOptions is the head option of the Copy
type ObjectCopyOptions ¶
type ObjectCopyOptions struct { *ObjectCopyHeaderOptions `header:",omitempty" url:"-" xml:"-"` *ACLHeaderOptions `header:",omitempty" url:"-" xml:"-"` }
ObjectCopyOptions is the option of Copy, choose header or body
type ObjectCopyPartOptions ¶
type ObjectCopyPartOptions struct { XCosCopySource string `header:"x-cos-copy-source" url:"-"` XCosCopySourceRange string `header:"x-cos-copy-source-range,omitempty" url:"-"` XCosCopySourceIfModifiedSince string `header:"x-cos-copy-source-If-Modified-Since,omitempty" url:"-"` XCosCopySourceIfUnmodifiedSince string `header:"x-cos-copy-source-If-Unmodified-Since,omitempty" url:"-"` XCosCopySourceIfMatch string `header:"x-cos-copy-source-If-Match,omitempty" url:"-"` XCosCopySourceIfNoneMatch string `header:"x-cos-copy-source-If-None-Match,omitempty" url:"-"` }
ObjectCopyPartOptions is the options of copy-part
type ObjectCopyResult ¶
type ObjectCopyResult struct { XMLName xml.Name `xml:"CopyObjectResult"` ETag string `xml:"ETag,omitempty"` LastModified string `xml:"LastModified,omitempty"` CRC64 string `xml:"CRC64,omitempty"` VersionId string `xml:"VersionId,omitempty"` }
ObjectCopyResult is the result of Copy
type ObjectDeleteMultiOptions ¶
type ObjectDeleteMultiOptions struct { XMLName xml.Name `xml:"Delete" header:"-"` Quiet bool `xml:"Quiet" header:"-"` Objects []Object `xml:"Object" header:"-"` }
ObjectDeleteMultiOptions is the option of DeleteMulti
type ObjectDeleteMultiResult ¶
type ObjectDeleteMultiResult struct { XMLName xml.Name `xml:"DeleteResult"` DeletedObjects []Object `xml:"Deleted,omitempty"` Errors []struct { Key string `xml:",omitempty"` Code string `xml:",omitempty"` Message string `xml:",omitempty"` VersionId string `xml:",omitempty"` } `xml:"Error,omitempty"` }
ObjectDeleteMultiResult is the result of DeleteMulti
type ObjectDeleteOptions ¶
type ObjectDeleteOptions struct { // SSE-C XCosSSECustomerAglo string `header:"x-cos-server-side-encryption-customer-algorithm,omitempty" url:"-" xml:"-"` XCosSSECustomerKey string `header:"x-cos-server-side-encryption-customer-key,omitempty" url:"-" xml:"-"` XCosSSECustomerKeyMD5 string `header:"x-cos-server-side-encryption-customer-key-MD5,omitempty" url:"-" xml:"-"` //兼容其他自定义头部 XOptionHeader *http.Header `header:"-,omitempty" url:"-" xml:"-"` VersionId string `header:"-" url:"VersionId,omitempty" xml:"-"` }
type ObjectGetACLResult ¶
type ObjectGetACLResult = ACLXml
ObjectGetACLResult is the result of GetObjectACL
type ObjectGetOptions ¶
type ObjectGetOptions struct { ResponseContentType string `url:"response-content-type,omitempty" header:"-"` ResponseContentLanguage string `url:"response-content-language,omitempty" header:"-"` ResponseExpires string `url:"response-expires,omitempty" header:"-"` ResponseCacheControl string `url:"response-cache-control,omitempty" header:"-"` ResponseContentDisposition string `url:"response-content-disposition,omitempty" header:"-"` ResponseContentEncoding string `url:"response-content-encoding,omitempty" header:"-"` Range string `url:"-" header:"Range,omitempty"` IfModifiedSince string `url:"-" header:"If-Modified-Since,omitempty"` // SSE-C XCosSSECustomerAglo string `header:"x-cos-server-side-encryption-customer-algorithm,omitempty" url:"-" xml:"-"` XCosSSECustomerKey string `header:"x-cos-server-side-encryption-customer-key,omitempty" url:"-" xml:"-"` XCosSSECustomerKeyMD5 string `header:"x-cos-server-side-encryption-customer-key-MD5,omitempty" url:"-" xml:"-"` //兼容其他自定义头部 XOptionHeader *http.Header `header:"-,omitempty" url:"-" xml:"-"` XCosTrafficLimit int `header:"x-cos-traffic-limit,omitempty" url:"-" xml:"-"` // 下载进度, ProgressCompleteEvent不能表示对应API调用成功,API是否调用成功的判断标准为返回err==nil Listener ProgressListener `header:"-" url:"-" xml:"-"` }
ObjectGetOptions is the option of GetObject
func CloneObjectGetOptions ¶
func CloneObjectGetOptions(opt *ObjectGetOptions) *ObjectGetOptions
type ObjectGetTaggingResult ¶
type ObjectGetTaggingResult ObjectPutTaggingOptions
type ObjectHeadOptions ¶
type ObjectHeadOptions struct { IfModifiedSince string `url:"-" header:"If-Modified-Since,omitempty"` // SSE-C XCosSSECustomerAglo string `header:"x-cos-server-side-encryption-customer-algorithm,omitempty" url:"-" xml:"-"` XCosSSECustomerKey string `header:"x-cos-server-side-encryption-customer-key,omitempty" url:"-" xml:"-"` XCosSSECustomerKeyMD5 string `header:"x-cos-server-side-encryption-customer-key-MD5,omitempty" url:"-" xml:"-"` XOptionHeader *http.Header `header:"-,omitempty" url:"-" xml:"-"` }
ObjectHeadOptions is the option of HeadObject
type ObjectList ¶
type ObjectList []Object
ObjectList can used for sort the parts which needs in complete upload part sort.Sort(cos.ObjectList(opt.Parts))
func (ObjectList) Len ¶
func (o ObjectList) Len() int
func (ObjectList) Less ¶
func (o ObjectList) Less(i, j int) bool
func (ObjectList) Swap ¶
func (o ObjectList) Swap(i, j int)
type ObjectListPartsOptions ¶
type ObjectListPartsOptions struct { EncodingType string `url:"Encoding-type,omitempty"` MaxParts string `url:"max-parts,omitempty"` PartNumberMarker string `url:"part-number-marker,omitempty"` }
ObjectListPartsOptions is the option of ListParts
type ObjectListPartsResult ¶
type ObjectListPartsResult struct { XMLName xml.Name `xml:"ListPartsResult"` Bucket string EncodingType string `xml:"Encoding-type,omitempty"` Key string UploadID string `xml:"UploadId"` Initiator *Initiator `xml:"Initiator,omitempty"` Owner *Owner `xml:"Owner,omitempty"` StorageClass string PartNumberMarker string NextPartNumberMarker string `xml:"NextPartNumberMarker,omitempty"` MaxParts string IsTruncated bool Parts []Object `xml:"Part,omitempty"` }
ObjectListPartsResult is the result of ListParts
type ObjectListUploadsOptions ¶
type ObjectListUploadsOptions struct { Delimiter string `url:"delimiter,omitempty"` EncodingType string `url:"encoding-type,omitempty"` Prefix string `url:"prefix,omitempty"` MaxUploads int `url:"max-uploads,omitempty"` KeyMarker string `url:"key-marker,omitempty"` UploadIdMarker string `url:"upload-id-marker,omitempty"` }
type ObjectListUploadsResult ¶
type ObjectListUploadsResult struct { XMLName xml.Name `xml:"ListMultipartUploadsResult"` Bucket string `xml:"Bucket,omitempty"` EncodingType string `xml:"Encoding-Type,omitempty"` KeyMarker string `xml:"KeyMarker,omitempty"` UploadIdMarker string `xml:"UploadIdMarker,omitempty"` NextKeyMarker string `xml:"NextKeyMarker,omitempty"` NextUploadIdMarker string `xml:"NextUploadIdMarker,omitempty"` MaxUploads string `xml:"MaxUploads,omitempty"` IsTruncated bool `xml:"IsTruncated,omitempty"` Prefix string `xml:"Prefix,omitempty"` Delimiter string `xml:"Delimiter,omitempty"` Upload []ListUploadsResultUpload `xml:"Upload,omitempty"` CommonPrefixes []string `xml:"CommonPrefixes>Prefix,omitempty"` }
type ObjectOptionsOptions ¶
type ObjectOptionsOptions struct { Origin string `url:"-" header:"Origin"` AccessControlRequestMethod string `url:"-" header:"Access-Control-Request-Method"` AccessControlRequestHeaders string `url:"-" header:"Access-Control-Request-Headers,omitempty"` }
ObjectOptionsOptions is the option of object options
type ObjectPutACLOptions ¶
type ObjectPutACLOptions struct { Header *ACLHeaderOptions `url:"-" xml:"-"` Body *ACLXml `url:"-" header:"-"` }
ObjectPutACLOptions the options of put object acl
type ObjectPutHeaderOptions ¶
type ObjectPutHeaderOptions struct { CacheControl string `header:"Cache-Control,omitempty" url:"-"` ContentDisposition string `header:"Content-Disposition,omitempty" url:"-"` ContentEncoding string `header:"Content-Encoding,omitempty" url:"-"` ContentType string `header:"Content-Type,omitempty" url:"-"` ContentMD5 string `header:"Content-MD5,omitempty" url:"-"` ContentLength int64 `header:"Content-Length,omitempty" url:"-"` ContentLanguage string `header:"Content-Language,omitempty" url:"-"` Expect string `header:"Expect,omitempty" url:"-"` Expires string `header:"Expires,omitempty" url:"-"` XCosContentSHA1 string `header:"x-cos-content-sha1,omitempty" url:"-"` // 自定义的 x-cos-meta-* header XCosMetaXXX *http.Header `header:"x-cos-meta-*,omitempty" url:"-"` XCosStorageClass string `header:"x-cos-storage-class,omitempty" url:"-"` // 可选值: Normal, Appendable //XCosObjectType string `header:"x-cos-object-type,omitempty" url:"-"` // Enable Server Side Encryption, Only supported: AES256 XCosServerSideEncryption string `header:"x-cos-server-side-encryption,omitempty" url:"-" xml:"-"` // SSE-C XCosSSECustomerAglo string `header:"x-cos-server-side-encryption-customer-algorithm,omitempty" url:"-" xml:"-"` XCosSSECustomerKey string `header:"x-cos-server-side-encryption-customer-key,omitempty" url:"-" xml:"-"` XCosSSECustomerKeyMD5 string `header:"x-cos-server-side-encryption-customer-key-MD5,omitempty" url:"-" xml:"-"` //兼容其他自定义头部 XOptionHeader *http.Header `header:"-,omitempty" url:"-" xml:"-"` XCosTrafficLimit int `header:"x-cos-traffic-limit,omitempty" url:"-" xml:"-"` // 上传进度, ProgressCompleteEvent不能表示对应API调用成功,API是否调用成功的判断标准为返回err==nil Listener ProgressListener `header:"-" url:"-" xml:"-"` }
ObjectPutHeaderOptions the options of header of the put object
type ObjectPutOptions ¶
type ObjectPutOptions struct { *ACLHeaderOptions `header:",omitempty" url:"-" xml:"-"` *ObjectPutHeaderOptions `header:",omitempty" url:"-" xml:"-"` }
ObjectPutOptions the options of put object
func CloneObjectPutOptions ¶
func CloneObjectPutOptions(opt *ObjectPutOptions) *ObjectPutOptions
type ObjectPutTaggingOptions ¶
type ObjectPutTaggingOptions struct { XMLName xml.Name `xml:"Tagging"` TagSet []ObjectTaggingTag `xml:"TagSet>Tag,omitempty"` }
type ObjectRestoreOptions ¶
type ObjectRestoreOptions struct { XMLName xml.Name `xml:"RestoreRequest" header:"-" url:"-"` Days int `xml:"Days" header:"-" url:"-"` Tier *CASJobParameters `xml:"CASJobParameters" header:"-" url:"-"` XOptionHeader *http.Header `xml:"-" header:",omitempty" url:"-"` }
ObjectRestoreOptions is the option of object restore
type ObjectResult ¶
type ObjectResult struct { Name string `xml:"Name,omitempty"` Location *Location `xml:"Location,omitempty"` }
ObjectResult
type ObjectSelectOptions ¶
type ObjectSelectOptions struct { XMLName xml.Name `xml:"SelectRequest"` Expression string `xml:"Expression"` ExpressionType string `xml:"ExpressionType"` InputSerialization *SelectInputSerialization `xml:"InputSerialization"` OutputSerialization *SelectOutputSerialization `xml:"OutputSerialization"` RequestProgress string `xml:"RequestProgress>Enabled,omitempty"` }
type ObjectSelectResponse ¶
type ObjectSelectResponse struct { StatusCode int Headers http.Header Body io.ReadCloser Frame *ObjectSelectResult Finish bool }
func (*ObjectSelectResponse) Close ¶
func (osr *ObjectSelectResponse) Close() error
type ObjectSelectResult ¶
type ObjectSelectResult struct { TotalFrameLength int32 TotalHeaderLength int32 NextFrame bool FrameType int Payload []byte DataFrame DataFrame ProgressFrame ProgressFrame StatsFrame StatsFrame ErrorFrame *ErrorFrame }
type ObjectService ¶
type ObjectService service
ObjectService 相关 API
func (*ObjectService) AbortMultipartUpload ¶
func (s *ObjectService) AbortMultipartUpload(ctx context.Context, name, uploadID string) (*Response, error)
AbortMultipartUpload 用来实现舍弃一个分块上传并删除已上传的块。当您调用Abort Multipart Upload时, 如果有正在使用这个Upload Parts上传块的请求,则Upload Parts会返回失败。当该UploadID不存在时,会返回404 NoSuchUpload。
建议您及时完成分块上传或者舍弃分块上传,因为已上传但是未终止的块会占用存储空间进而产生存储费用。
func (*ObjectService) Append ¶
func (s *ObjectService) Append(ctx context.Context, name string, position int, r io.Reader, opt *ObjectPutOptions) (int, *Response, error)
Append请求可以将一个文件(Object)以分块追加的方式上传至 Bucket 中。使用Append Upload的文件必须事前被设定为Appendable。 当Appendable的文件被执行Put Object的操作以后,文件被覆盖,属性改变为Normal。
文件属性可以在Head Object操作中被查询到,当您发起Head Object请求时,会返回自定义Header『x-cos-object-type』,该Header只有两个枚举值:Normal或者Appendable。
追加上传建议文件大小1M - 5G。如果position的值和当前Object的长度不致,COS会返回409错误。 如果Append一个Normal的Object,COS会返回409 ObjectNotAppendable。
Appendable的文件不可以被复制,不参与版本管理,不参与生命周期管理,不可跨区域复制。
当 r 不是 bytes.Buffer/bytes.Reader/strings.Reader 时,必须指定 opt.ObjectPutHeaderOptions.ContentLength
func (*ObjectService) CompleteMultipartUpload ¶
func (s *ObjectService) CompleteMultipartUpload(ctx context.Context, name, uploadID string, opt *CompleteMultipartUploadOptions) (*CompleteMultipartUploadResult, *Response, error)
CompleteMultipartUpload 用来实现完成整个分块上传。当您已经使用Upload Parts上传所有块以后,你可以用该API完成上传。 在使用该API时,您必须在Body中给出每一个块的PartNumber和ETag,用来校验块的准确性。
由于分块上传的合并需要数分钟时间,因而当合并分块开始的时候,COS就立即返回200的状态码,在合并的过程中, COS会周期性的返回空格信息来保持连接活跃,直到合并完成,COS会在Body中返回合并后块的内容。
当上传块小于1 MB的时候,在调用该请求时,会返回400 EntityTooSmall; 当上传块编号不连续的时候,在调用该请求时,会返回400 InvalidPart; 当请求Body中的块信息没有按序号从小到大排列的时候,在调用该请求时,会返回400 InvalidPartOrder; 当UploadId不存在的时候,在调用该请求时,会返回404 NoSuchUpload。
建议您及时完成分块上传或者舍弃分块上传,因为已上传但是未终止的块会占用存储空间进而产生存储费用。
func (*ObjectService) Copy ¶
func (s *ObjectService) Copy(ctx context.Context, name, sourceURL string, opt *ObjectCopyOptions, id ...string) (*ObjectCopyResult, *Response, error)
Copy 调用 PutObjectCopy 请求实现将一个文件从源路径复制到目标路径。建议文件大小 1M 到 5G, 超过 5G 的文件请使用分块上传 Upload - Copy。在拷贝的过程中,文件元属性和 ACL 可以被修改。
用户可以通过该接口实现文件移动,文件重命名,修改文件属性和创建副本。
注意:在跨帐号复制的时候,需要先设置被复制文件的权限为公有读,或者对目标帐号赋权,同帐号则不需要。
func (*ObjectService) CopyPart ¶
func (s *ObjectService) CopyPart(ctx context.Context, name, uploadID string, partNumber int, sourceURL string, opt *ObjectCopyPartOptions) (*CopyPartResult, *Response, error)
CopyPart 请求实现在初始化以后的分块上传,支持的块的数量为1到10000,块的大小为1 MB 到5 GB。 在每次请求Upload Part时候,需要携带partNumber和uploadID,partNumber为块的编号,支持乱序上传。 ObjectCopyPartOptions的XCosCopySource为必填参数,格式为<bucket-name>-<app-id>.cos.<region-id>.myqcloud.com/<object-key> ObjectCopyPartOptions的XCosCopySourceRange指定源的Range,格式为bytes=<start>-<end>
当传入uploadID和partNumber都相同的时候,后传入的块将覆盖之前传入的块。当uploadID不存在时会返回404错误,NoSuchUpload.
func (*ObjectService) Delete ¶
func (s *ObjectService) Delete(ctx context.Context, name string, opt ...*ObjectDeleteOptions) (*Response, error)
Delete Object请求可以将一个文件(Object)删除。
func (*ObjectService) DeleteMulti ¶
func (s *ObjectService) DeleteMulti(ctx context.Context, opt *ObjectDeleteMultiOptions) (*ObjectDeleteMultiResult, *Response, error)
DeleteMulti 请求实现批量删除文件,最大支持单次删除1000个文件。 对于返回结果,COS提供Verbose和Quiet两种结果模式。Verbose模式将返回每个Object的删除结果; Quiet模式只返回报错的Object信息。 https://www.qcloud.com/document/product/436/8289
func (*ObjectService) DeleteTagging ¶
func (*ObjectService) Download ¶
func (s *ObjectService) Download(ctx context.Context, name string, filepath string, opt *MultiDownloadOptions, id ...string) (*Response, error)
func (*ObjectService) Get ¶
func (s *ObjectService) Get(ctx context.Context, name string, opt *ObjectGetOptions, id ...string) (*Response, error)
Get Object 请求可以将一个文件(Object)下载至本地。 该操作需要对目标 Object 具有读权限或目标 Object 对所有人都开放了读权限(公有读)。
func (*ObjectService) GetACL ¶
func (s *ObjectService) GetACL(ctx context.Context, name string) (*ObjectGetACLResult, *Response, error)
GetACL Get Object ACL接口实现使用API读取Object的ACL表,只有所有者有权操作。
func (*ObjectService) GetFetchTask ¶
func (s *ObjectService) GetFetchTask(ctx context.Context, bucket string, taskid string) (*GetFetchTaskResult, *Response, error)
func (*ObjectService) GetObjectURL ¶
func (s *ObjectService) GetObjectURL(name string) *url.URL
func (*ObjectService) GetPresignedURL ¶
func (s *ObjectService) GetPresignedURL(ctx context.Context, httpMethod, name, ak, sk string, expired time.Duration, opt interface{}, signHost ...bool) (*url.URL, error)
GetPresignedURL get the object presigned to down or upload file by url 预签名函数,signHost: 默认签入Header Host, 您也可以选择不签入Header Host,但可能导致请求失败或安全漏洞
func (*ObjectService) GetTagging ¶
func (s *ObjectService) GetTagging(ctx context.Context, name string, id ...string) (*ObjectGetTaggingResult, *Response, error)
func (*ObjectService) GetToFile ¶
func (s *ObjectService) GetToFile(ctx context.Context, name, localpath string, opt *ObjectGetOptions, id ...string) (*Response, error)
GetToFile download the object to local file
func (*ObjectService) Head ¶
func (s *ObjectService) Head(ctx context.Context, name string, opt *ObjectHeadOptions, id ...string) (*Response, error)
Head Object请求可以取回对应Object的元数据,Head的权限与Get的权限一致
func (*ObjectService) InitiateMultipartUpload ¶
func (s *ObjectService) InitiateMultipartUpload(ctx context.Context, name string, opt *InitiateMultipartUploadOptions) (*InitiateMultipartUploadResult, *Response, error)
InitiateMultipartUpload 请求实现初始化分片上传,成功执行此请求以后会返回Upload ID用于后续的Upload Part请求。
func (*ObjectService) ListParts ¶
func (s *ObjectService) ListParts(ctx context.Context, name, uploadID string, opt *ObjectListPartsOptions) (*ObjectListPartsResult, *Response, error)
ListParts 用来查询特定分块上传中的已上传的块。
func (*ObjectService) ListUploads ¶
func (s *ObjectService) ListUploads(ctx context.Context, opt *ObjectListUploadsOptions) (*ObjectListUploadsResult, *Response, error)
func (*ObjectService) MultiCopy ¶
func (s *ObjectService) MultiCopy(ctx context.Context, name string, sourceURL string, opt *MultiCopyOptions, id ...string) (*ObjectCopyResult, *Response, error)
如果源对象大于5G,则采用分块复制的方式进行拷贝,此时源对象的元信息如果COPY
func (*ObjectService) MultiUpload ¶
func (s *ObjectService) MultiUpload(ctx context.Context, name string, filepath string, opt *MultiUploadOptions) (*CompleteMultipartUploadResult, *Response, error)
MultiUpload/Upload 为高级upload接口,并发分块上传
当 partSize > 0 时,由调用者指定分块大小,否则由 SDK 自动切分,单位为MB 由调用者指定分块大小时,请确认分块数量不超过10000
func (*ObjectService) Options ¶
func (s *ObjectService) Options(ctx context.Context, name string, opt *ObjectOptionsOptions) (*Response, error)
Options Object请求实现跨域访问的预请求。即发出一个 OPTIONS 请求给服务器以确认是否可以进行跨域操作。
当CORS配置不存在时,请求返回403 Forbidden。
func (*ObjectService) PostRestore ¶
func (s *ObjectService) PostRestore(ctx context.Context, name string, opt *ObjectRestoreOptions) (*Response, error)
PutRestore API can recover an object of type archived by COS archive.
func (*ObjectService) Put ¶
func (s *ObjectService) Put(ctx context.Context, name string, r io.Reader, uopt *ObjectPutOptions) (*Response, error)
Put Object请求可以将一个文件(Oject)上传至指定Bucket。
func (*ObjectService) PutACL ¶
func (s *ObjectService) PutACL(ctx context.Context, name string, opt *ObjectPutACLOptions) (*Response, error)
PutACL 使用API写入Object的ACL表,您可以通过Header:"x-cos-acl", "x-cos-grant-read" , "x-cos-grant-write" ,"x-cos-grant-full-control"传入ACL信息, 也可以通过body以XML格式传入ACL信息,但是只能选择Header和Body其中一种,否则,返回冲突。
Put Object ACL是一个覆盖操作,传入新的ACL将覆盖原有ACL。只有所有者有权操作。
"x-cos-acl":枚举值为public-read,private;public-read意味这个Object有公有读私有写的权限, private意味这个Object有私有读写的权限。
"x-cos-grant-read":意味被赋予权限的用户拥有该Object的读权限
"x-cos-grant-write":意味被赋予权限的用户拥有该Object的写权限
"x-cos-grant-full-control":意味被赋予权限的用户拥有该Object的读写权限
func (*ObjectService) PutFetchTask ¶
func (s *ObjectService) PutFetchTask(ctx context.Context, bucket string, opt *PutFetchTaskOptions) (*PutFetchTaskResult, *Response, error)
func (*ObjectService) PutFromFile ¶
func (s *ObjectService) PutFromFile(ctx context.Context, name string, filePath string, opt *ObjectPutOptions) (resp *Response, err error)
PutFromFile put object from local file
func (*ObjectService) PutTagging ¶
func (s *ObjectService) PutTagging(ctx context.Context, name string, opt *ObjectPutTaggingOptions, id ...string) (*Response, error)
func (*ObjectService) Select ¶
func (s *ObjectService) Select(ctx context.Context, name string, opt *ObjectSelectOptions) (io.ReadCloser, error)
func (*ObjectService) SelectToFile ¶
func (s *ObjectService) SelectToFile(ctx context.Context, name, file string, opt *ObjectSelectOptions) (*ObjectSelectResponse, error)
func (*ObjectService) Upload ¶
func (s *ObjectService) Upload(ctx context.Context, name string, filepath string, opt *MultiUploadOptions) (*CompleteMultipartUploadResult, *Response, error)
func (*ObjectService) UploadPart ¶
func (s *ObjectService) UploadPart(ctx context.Context, name, uploadID string, partNumber int, r io.Reader, uopt *ObjectUploadPartOptions) (*Response, error)
UploadPart 请求实现在初始化以后的分块上传,支持的块的数量为1到10000,块的大小为1 MB 到5 GB。 在每次请求Upload Part时候,需要携带partNumber和uploadID,partNumber为块的编号,支持乱序上传。
当传入uploadID和partNumber都相同的时候,后传入的块将覆盖之前传入的块。当uploadID不存在时会返回404错误,NoSuchUpload.
当 r 不是 bytes.Buffer/bytes.Reader/strings.Reader 时,必须指定 opt.ContentLength
type ObjectTaggingTag ¶
type ObjectTaggingTag BucketTaggingTag
type ObjectUploadPartOptions ¶
type ObjectUploadPartOptions struct { Expect string `header:"Expect,omitempty" url:"-"` XCosContentSHA1 string `header:"x-cos-content-sha1,omitempty" url:"-"` ContentLength int64 `header:"Content-Length,omitempty" url:"-"` ContentMD5 string `header:"Content-MD5,omitempty" url:"-"` XCosSSECustomerAglo string `header:"x-cos-server-side-encryption-customer-algorithm,omitempty" url:"-" xml:"-"` XCosSSECustomerKey string `header:"x-cos-server-side-encryption-customer-key,omitempty" url:"-" xml:"-"` XCosSSECustomerKeyMD5 string `header:"x-cos-server-side-encryption-customer-key-MD5,omitempty" url:"-" xml:"-"` XCosTrafficLimit int `header:"x-cos-traffic-limit,omitempty" url:"-" xml:"-"` XOptionHeader *http.Header `header:"-,omitempty" url:"-" xml:"-"` // 上传进度, ProgressCompleteEvent不能表示对应API调用成功,API是否调用成功的判断标准为返回err==nil Listener ProgressListener `header:"-" url:"-" xml:"-"` }
ObjectUploadPartOptions is the options of upload-part
func CloneObjectUploadPartOptions ¶
func CloneObjectUploadPartOptions(opt *ObjectUploadPartOptions) *ObjectUploadPartOptions
type OcrResult ¶
type OcrResult struct { Text string `xml:"Text,omitempty"` Keywords []string `xml:"Keywords,omitempty"` Location *Location `xml:"Location,omitempty"` }
OcrResult
type OriginHttpHeader ¶
type Owner ¶
type Owner struct { UIN string `xml:"uin,omitempty"` ID string `xml:",omitempty"` DisplayName string `xml:",omitempty"` }
Owner defines Bucket/Object's owner
type PicImageInfo ¶
type PicOperations ¶
type PicOperations struct { IsPicInfo int `json:"is_pic_info,omitempty"` Rules []PicOperationsRules `json:"rules,omitemtpy"` }
type PicOperationsRules ¶
type PicOriginalInfo ¶
type PicOriginalInfo struct { Key string `xml:"Key,omitempty"` Location string `xml:"Location,omitempty"` ImageInfo *PicImageInfo `xml:"ImageInfo,omitempty"` ETag string `xml:"ETag,omitempty"` }
type PicProcessObject ¶
type PicProcessObject struct { Key string `xml:"Key,omitempty"` Location string `xml:"Location,omitempty"` Format string `xml:"Format,omitempty"` Width int `xml:"Width,omitempty"` Height int `xml:"Height,omitempty"` Size int `xml:"Size,omitempty"` Quality int `xml:"Quality,omitempty"` ETag string `xml:"ETag,omitempty"` WatermarkStatus int `xml:"WatermarkStatus,omitempty"` CodeStatus int `xml:"CodeStatus,omitempty"` QRcodeInfo []QRcodeInfo `xml:"QRcodeInfo,omitempty"` }
type PresignedURLOptions ¶
type ProgressEvent ¶
type ProgressEvent struct { EventType ProgressEventType RWBytes int64 ConsumedBytes int64 TotalBytes int64 Err error }
type ProgressEventType ¶
type ProgressEventType int
const ( // 数据开始传输 ProgressStartedEvent ProgressEventType = iota // 数据传输中 ProgressDataEvent // 数据传输完成, 但不能表示对应API调用完成 ProgressCompletedEvent // 只有在数据传输时发生错误才会返回 ProgressFailedEvent )
type ProgressFrame ¶
type ProgressListener ¶
type ProgressListener interface {
ProgressChangedCallback(event *ProgressEvent)
}
用户自定义Listener需要实现该方法
type PutAudioAuditingJobOptions ¶
type PutAudioAuditingJobOptions struct { XMLName xml.Name `xml:"Request"` InputObject string `xml:"Input>Object,omitempty"` InputUrl string `xml:"Input>Url,omitempty"` InputDataId string `xml:"Input>DataId,omitempty"` Conf *AudioAuditingJobConf `xml:"Conf"` }
PutAudioAuditingJobOptions is the option of PutAudioAuditingJob
type PutAudioAuditingJobResult ¶
type PutAudioAuditingJobResult PutVideoAuditingJobResult
PutAudioAuditingJobResult is the result of PutAudioAuditingJob
type PutBucketReplicationOptions ¶
type PutBucketReplicationOptions struct { XMLName xml.Name `xml:"ReplicationConfiguration"` Role string `xml:"Role"` Rule []BucketReplicationRule `xml:"Rule"` }
PutBucketReplicationOptions is the options of PutBucketReplication
type PutDocumentAuditingJobOptions ¶
type PutDocumentAuditingJobOptions struct { XMLName xml.Name `xml:"Request"` InputObject string `xml:"Input>Object,omitempty"` InputUrl string `xml:"Input>Url,omitempty"` InputType string `xml:"Input>Type,omitempty"` InputDataId string `xml:"Input>DataId,omitempty"` Conf *DocumentAuditingJobConf `xml:"Conf"` }
PutDocumentAuditingJobOptions is the option of PutDocumentAuditingJob
type PutDocumentAuditingJobResult ¶
type PutDocumentAuditingJobResult PutVideoAuditingJobResult
PutDocumentAuditingJobResult is the result of PutDocumentAuditingJob
type PutFetchTaskOptions ¶
type PutFetchTaskOptions struct { Url string `json:"Url,omitempty" header:"-" xml:"-"` Key string `json:"Key,omitempty" header:"-" xml:"-"` MD5 string `json:"MD5,omitempty" header:"-" xml:"-"` OnKeyExist string `json:"OnKeyExist,omitempty" header:"-" xml:"-"` IgnoreSameKey bool `json:"IgnoreSameKey,omitempty" header:"-" xml:"-"` SuccessCallbackUrl string `json:"SuccessCallbackUrl,omitempty" header:"-" xml:"-"` FailureCallbackUrl string `json:"FailureCallbackUrl,omitempty" header:"-" xml:"-"` XOptionHeader *http.Header `json:"-", xml:"-" header:"-,omitempty"` }
type PutFetchTaskResult ¶
type PutTextAuditingJobOptions ¶
type PutTextAuditingJobOptions struct { XMLName xml.Name `xml:"Request"` InputObject string `xml:"Input>Object,omitempty"` InputContent string `xml:"Input>Content,omitempty"` InputDataId string `xml:"Input>DataId,omitempty"` Conf *TextAuditingJobConf `xml:"Conf"` }
PutTextAuditingJobOptions is the option of PutTextAuditingJob
type PutTextAuditingJobResult ¶
type PutTextAuditingJobResult GetTextAuditingJobResult
PutTextAuditingJobResult is the result of PutTextAuditingJob
type PutVideoAuditingJobOptions ¶
type PutVideoAuditingJobOptions struct { XMLName xml.Name `xml:"Request"` InputObject string `xml:"Input>Object,omitempty"` InputUrl string `xml:"Input>Url,omitempty"` InputDataId string `xml:"Input>DataId,omitempty"` Conf *VideoAuditingJobConf `xml:"Conf"` }
PutVideoAuditingJobOptions is the option of PutVideoAuditingJob
type PutVideoAuditingJobResult ¶
type PutVideoAuditingJobResult struct { XMLName xml.Name `xml:"Response"` JobsDetail struct { JobId string `xml:"JobId,omitempty"` State string `xml:"State,omitempty"` CreationTime string `xml:"CreationTime,omitempty"` Object string `xml:"Object,omitempty"` Url string `xml:"Url,omitempty"` } `xml:"JobsDetail,omitempty"` RequestId string `xml:"RequestId,omitempty"` }
PutVideoAuditingJobResult is the result of PutVideoAuditingJob
type PutVideoAuditingJobSnapshot ¶
type PutVideoAuditingJobSnapshot struct { Mode string `xml:",omitempty"` Count int `xml:",omitempty"` TimeInterval float32 `xml:",omitempty"` }
PutVideoAuditingJobSnapshot is the snapshot config of VideoAuditingJobConf
type PutWebpageAuditingJobOptions ¶
type PutWebpageAuditingJobOptions struct { XMLName xml.Name `xml:"Request"` InputUrl string `xml:"Input>Url,omitempty"` Conf *WebpageAuditingJobConf `xml:"Conf"` }
PutWebpageAuditingJobOptions is the option of PutWebpageAuditingJob
type PutWebpageAuditingJobResult ¶
type PutWebpageAuditingJobResult PutVideoAuditingJobResult
PutWebpageAuditingJobResult is the result of PutWebpageAuditingJob
type QRcodeInfo ¶
type QRcodeInfo struct { CodeUrl string `xml:"CodeUrl,omitempty"` CodeLocation *CodeLocation `xml:"CodeLocation,omitempty"` }
type RangeOptions ¶
func GetRange ¶
func GetRange(rangeStr string) (*RangeOptions, error)
func GetRangeOptions ¶
func GetRangeOptions(opt *ObjectGetOptions) (*RangeOptions, error)
type RecognitionInfo ¶
type RecognitionInfo struct { Code int `xml:"Code,omitempty"` Msg string `xml:"Msg,omitempty"` HitFlag int `xml:"HitFlag,omitempty"` Score int `xml:"Score,omitempty"` Label string `xml:"Label,omitempty"` Count int `xml:"Count,omitempty"` SubLabel string `xml:"SubLabel,omitempty"` Keywords []string `xml:"Keywords,omitempty"` OcrResults []OcrResult `xml:"OcrResults,omitempty"` ObjectResults []ObjectResult `xml:"ObjectResults,omitempty"` LibResults []LibResult `xml:"LibResults,omitempty"` }
RecognitionInfo is the result of auditing scene
type RedirectRequestsProtocol ¶
type RedirectRequestsProtocol struct {
Protocol string `xml:"Protocol,omitempty"`
}
type ReplicationDestination ¶
type ReplicationDestination struct { Bucket string `xml:"Bucket"` StorageClass string `xml:"StorageClass,omitempty"` }
ReplicationDestination is the sub struct of BucketReplicationRule
type SelectInputSerialization ¶
type SelectInputSerialization struct { CompressionType string `xml:"CompressionType,omitempty"` CSV *CSVInputSerialization `xml:"CSV,omitempty"` JSON *JSONInputSerialization `xml:"JSON,omitempty"` }
type SelectOutputSerialization ¶
type SelectOutputSerialization struct { CSV *CSVOutputSerialization `xml:"CSV,omitempty"` JSON *JSONOutputSerialization `xml:"JSON,omitempty"` }
type ServiceGetResult ¶
type ServiceGetResult struct { XMLName xml.Name `xml:"ListAllMyBucketsResult"` Owner *Owner `xml:"Owner"` Buckets []Bucket `xml:"Buckets>Bucket,omitempty"` }
ServiceGetResult is the result of Get Service
type ServiceService ¶
type ServiceService service
Service 相关 API
func (*ServiceService) Get ¶
func (s *ServiceService) Get(ctx context.Context) (*ServiceGetResult, *Response, error)
Get Service 接口实现获取该用户下所有Bucket列表。
该API接口需要使用Authorization签名认证, 且只能获取签名中AccessID所属账户的Bucket列表。
type Snapshot ¶
type Snapshot struct { Mode string `xml:"Mode,omitempty"` Start string `xml:"Start,omitempty"` TimeInterval string `xml:"TimeInterval,omitempty"` Count string `xml:"Count,omitempty"` Width string `xml:"Width,omitempty"` Height string `xml:"Height,omitempty"` SnapshotOutMode string `xml:"SnapshotOutMode,omitempty"` SpriteSnapshotConfig *SpriteSnapshotConfig `xml:"SpriteSnapshotConfig,omitempty"` }
type SpriteSnapshotConfig ¶
type SpriteSnapshotConfig struct { CellHeight string `xml:"CellHeight,omitempty"` CellWidth string `xml:"CellWidth,omitempty"` Color string `xml:"Color,omitempty"` Columns string `xml:"Columns,omitempty"` Lines string `xml:"Lines,omitempty"` Margin string `xml:"Margin,omitempty"` Padding string `xml:"Padding,omitempty"` }
type StatsFrame ¶
type TextAuditingJobConf ¶
type TextAuditingJobConf struct { DetectType string `xml:",omitempty"` Callback string `xml:",omitempty"` CallbackVersion string `xml:",omitempty"` BizType string `xml:",omitempty"` }
TextAuditingJobConf is the config of PutAudioAuditingJobOptions
type TextAuditingJobDetail ¶
type TextAuditingJobDetail struct { Code string `xml:",omitempty"` Message string `xml:",omitempty"` JobId string `xml:",omitempty"` State string `xml:",omitempty"` CreationTime string `xml:",omitempty"` Object string `xml:",omitempty"` Url string `xml:",omitempty"` DataId string `xml:",omitempty"` Content string `xml:",omitempty"` SectionCount int `xml:",omitempty"` Label string `xml:",omitempty"` Result int `xml:",omitempty"` PornInfo *TextRecognitionInfo `xml:",omitempty"` TerrorismInfo *TextRecognitionInfo `xml:",omitempty"` PoliticsInfo *TextRecognitionInfo `xml:",omitempty"` AdsInfo *TextRecognitionInfo `xml:",omitempty"` IllegalInfo *TextRecognitionInfo `xml:",omitempty"` AbuseInfo *TextRecognitionInfo `xml:",omitempty"` Section []TextSectionResult `xml:",omitempty"` }
TextAuditingJobDetail is the detail of GetTextAuditingJobResult
type TextRecognitionInfo ¶
type TextRecognitionInfo struct { Code int `xml:",omitempty"` HitFlag int `xml:",omitempty"` Score int `xml:",omitempty"` Count int `xml:",omitempty"` Keywords string `xml:",omitempty"` }
TextRecognitionInfo
type TextSectionResult ¶
type TextSectionResult struct { StartByte int `xml:",omitempty"` Label string `xml:",omitempty"` Result int `xml:",omitempty"` PornInfo *TextRecognitionInfo `xml:",omitempty"` TerrorismInfo *TextRecognitionInfo `xml:",omitempty"` PoliticsInfo *TextRecognitionInfo `xml:",omitempty"` AdsInfo *TextRecognitionInfo `xml:",omitempty"` IllegalInfo *TextRecognitionInfo `xml:",omitempty"` AbuseInfo *TextRecognitionInfo `xml:",omitempty"` }
TextSectionResult is the section result of TextAuditingJobDetail
type TimeInterval ¶
type TransConfig ¶
type TransConfig struct { AdjDarMethod string `xml:"AdjDarMethod"` IsCheckReso string `xml:"IsCheckReso"` ResoAdjMethod string `xml:"ResoAdjMethod"` IsCheckVideoBitrate string `xml:"IsCheckVideoBitrate"` VideoBitrateAdjMethod string `xml:"VideoBitrateAdjMethod"` IsCheckAudioBitrate string `xml:"IsCheckAudioBitrate"` AudioBitrateAdjMethod string `xml:"AudioBitrateAdjMethod"` }
type Transcode ¶
type Transcode struct { Container *Container `xml:"Container,omitempty"` Video *Video `xml:"Video,omitempty"` TimeInterval *TimeInterval `xml:"TimeInterval,omitempty"` Audio *Audio `xml:"Audio,omitempty"` TransConfig *TransConfig `xml:"TransConfig,omitempty"` }
type UpdateDocProcessQueueResult ¶
type UpdateDocProcessQueueResult struct { XMLName xml.Name `xml:"Response"` RequestId string `xml:"RequestId"` Queue *DocProcessQueue `xml:"Queue"` }
type UpdateMediaProcessQueueResult ¶
type UpdateMediaProcessQueueResult struct { XMLName xml.Name `xml:"Response"` RequestId string `xml:"RequestId"` Queue *MediaProcessQueue `xml:"Queue"` }
type Video ¶
type Video struct { Codec string `xml:"Codec"` Width string `xml:"Width"` Height string `xml:"Height"` Fps string `xml:"Fps"` Remove string `xml:"Remove,omitempty"` Profile string `xml:"Profile"` Bitrate string `xml:"Bitrate"` Crf string `xml:"Crf"` Gop string `xml:"Gop"` Preset string `xml:"Preset"` Bufsize string `xml:"Bufsize"` Maxrate string `xml:"Maxrate"` HlsTsTime string `xml:"HlsTsTime"` Pixfmt string `xml:"Pixfmt"` LongShortMode string `xml:"LongShortMode"` }
type VideoAuditingJobConf ¶
type VideoAuditingJobConf struct { DetectType string `xml:",omitempty"` Snapshot *PutVideoAuditingJobSnapshot `xml:",omitempty"` Callback string `xml:",omitempty"` CallbackVersion string `xml:",omitempty"` BizType string `xml:",omitempty"` DetectContent int `xml:",omitempty"` }
VideoAuditingJobConf is the config of PutVideoAuditingJobOptions
type Watermark ¶
type Watermark struct { Type string `xml:"Type,omitempty"` Pos string `xml:"Pos,omitempty"` LocMode string `xml:"LocMode,omitempty"` Dx string `xml:"Dx,omitempty"` Dy string `xml:"Dy,omitempty"` StartTime string `xml:"StartTime,omitempty"` EndTime string `xml:"EndTime,omitempty"` Image *Image `xml:"Image,omitempty"` Text *Text `xml:"Text,omitempty"` }
type WebpageAuditingJobConf ¶
type WebpageAuditingJobConf struct { DetectType string `xml:",omitempty"` Callback string `xml:",omitempty"` ReturnHighlightHtml bool `xml:",omitempty"` }
WebpageAuditingJobConf is the config of PutWebpageAuditingJobOptions
type WebpageAuditingJobDetail ¶
type WebpageAuditingJobDetail struct { Code string `xml:",omitempty"` Message string `xml:",omitempty"` JobId string `xml:",omitempty"` State string `xml:",omitempty"` CreationTime string `xml:",omitempty"` Url string `xml:",omitempty"` Labels *WebpageResultInfo `xml:",omitempty"` PageCount int `xml:",omitempty"` Suggestion int `xml:",omitempty"` ImageResults *WebpageImageResults `xml:",omitempty"` TextResults *WebpageTextResults `xml:",omitempty"` HighlightHtml string `xml:",omitempty"` }
WebpageAuditingJobDetail is the detail of GetWebpageAuditingJobResult
type WebpageImageResult ¶
type WebpageImageResult struct { Url string `xml:",omitempty"` Text string `xml:",omitempty"` Label string `xml:",omitempty"` PageNumber int `xml:",omitempty"` SheetNumber int `xml:",omitempty"` Suggestion int `xml:",omitempty"` PornInfo *RecognitionInfo `xml:",omitempty"` TerrorismInfo *RecognitionInfo `xml:",omitempty"` PoliticsInfo *RecognitionInfo `xml:",omitempty"` AdsInfo *RecognitionInfo `xml:",omitempty"` }
WebpageImageResult
type WebpageImageResults ¶
type WebpageImageResults struct {
Results []WebpageImageResult `xml:",omitempty"`
}
WebpageImageResults
type WebpageResultInfo ¶
type WebpageResultInfo struct { PornInfo *RecognitionInfo `xml:",omitempty"` TerrorismInfo *RecognitionInfo `xml:",omitempty"` PoliticsInfo *RecognitionInfo `xml:",omitempty"` AdsInfo *RecognitionInfo `xml:",omitempty"` }
WebpageResultInfo
type WebpageTextResult ¶
type WebpageTextResult struct { Text string `xml:",omitempty"` Label string `xml:",omitempty"` Result int `xml:",omitempty"` PageNumber int `xml:",omitempty"` SheetNumber int `xml:",omitempty"` Suggestion int `xml:",omitempty"` PornInfo *TextRecognitionInfo `xml:",omitempty"` TerrorismInfo *TextRecognitionInfo `xml:",omitempty"` PoliticsInfo *TextRecognitionInfo `xml:",omitempty"` AdsInfo *TextRecognitionInfo `xml:",omitempty"` IllegalInfo *TextRecognitionInfo `xml:",omitempty"` AbuseInfo *TextRecognitionInfo `xml:",omitempty"` }
WebpageTextResult
type WebpageTextResults ¶
type WebpageTextResults struct {
Results []WebpageTextResult `xml:",omitempty"`
}
WebpageTextResults
type WebsiteRoutingRule ¶
type WebsiteRoutingRule struct { ConditionErrorCode string `xml:"Condition>HttpErrorCodeReturnedEquals,omitempty"` ConditionPrefix string `xml:"Condition>KeyPrefixEquals,omitempty"` RedirectProtocol string `xml:"Redirect>Protocol,omitempty"` RedirectReplaceKey string `xml:"Redirect>ReplaceKeyWith,omitempty"` RedirectReplaceKeyPrefix string `xml:"Redirect>ReplaceKeyPrefixWith,omitempty"` }
type WebsiteRoutingRules ¶
type WebsiteRoutingRules struct {
Rules []WebsiteRoutingRule `xml:"RoutingRule,omitempty"`
}
type WorkflowExecutionNotifyBody ¶
type WorkflowExecutionNotifyBody struct { XMLName xml.Name `xml:"Response"` EventName string `xml:"EventName"` WorkflowExecution struct { RunId string `xml:"RunId"` BucketId string `xml:"BucketId"` Object string `xml:"Object"` CosHeaders []struct { Key string `xml:"Key"` Value string `xml:"Value"` } `xml:"CosHeaders"` WorkflowId string `xml:"WorkflowId"` WorkflowName string `xml:"WorkflowName"` CreateTime string `xml:"CreateTime"` State string `xml:"State"` Tasks []struct { Type string `xml:"Type"` CreateTime string `xml:"CreateTime"` EndTime string `xml:"EndTime"` State string `xml:"State"` JobId string `xml:"JobId"` Name string `xml:"Name"` TemplateId string `xml:"TemplateId"` TemplateName string `xml:"TemplateName"` TranscodeTemplateId string `xml:"TranscodeTemplateId,omitempty"` TranscodeTemplateName string `xml:"TranscodeTemplateName,omitempty"` HdrMode string `xml:"HdrMode,omitempty"` } `xml:"Tasks"` } `xml:"WorkflowExecution"` }
Source Files ¶
- auth.go
- batch.go
- bucket.go
- bucket_accelerate.go
- bucket_acl.go
- bucket_cors.go
- bucket_domain.go
- bucket_encryption.go
- bucket_intelligenttiering.go
- bucket_inventory.go
- bucket_lifecycle.go
- bucket_location.go
- bucket_logging.go
- bucket_origin.go
- bucket_part.go
- bucket_policy.go
- bucket_referer.go
- bucket_replication.go
- bucket_tagging.go
- bucket_version.go
- bucket_website.go
- ci.go
- ci_doc.go
- ci_media.go
- cos.go
- doc.go
- error.go
- helper.go
- object.go
- object_acl.go
- object_part.go
- object_select.go
- progress.go
- service.go