cos

package module
v0.7.57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 35 Imported by: 491

README

cos-go-sdk-v5

腾讯云对象存储服务 COS(Cloud Object Storage) Go SDK(API 版本:V5 版本的 XML API)。

Install

go get -u github.com/tencentyun/cos-go-sdk-v5

Usage

package main

import (
	"context"
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
	"os"
	"time"
	
	"github.com/tencentyun/cos-go-sdk-v5"
)

func main() {
	//将<bucket>和<region>修改为真实的信息
	//bucket的命名规则为{name}-{appid} ,此处填写的存储桶名称必须为此格式
	u, _ := url.Parse("https://<bucket>.cos.<region>.myqcloud.com")
	b := &cos.BaseURL{BucketURL: u}
	c := cos.NewClient(b, &http.Client{
		//设置超时时间
		Timeout: 100 * time.Second,
		Transport: &cos.AuthorizationTransport{
			//如实填写账号和密钥,也可以设置为环境变量
			SecretID:  os.Getenv("COS_SECRETID"),
			SecretKey: os.Getenv("COS_SECRETKEY"),
		},
	})

	name := "test/hello.txt"
	resp, err := c.Object.Get(context.Background(), name, nil)
	if err != nil {
		panic(err)
	}
	bs, _ := ioutil.ReadAll(resp.Body)
	resp.Body.Close()
	fmt.Printf("%s\n", string(bs))
}

所有的 API 在 example 目录下都有对应的使用示例。

Service API:

Bucket API:

Object API:

数据处理 API:

内容审核 API:

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

View Source
const (
	// Version current go sdk version
	Version   = "0.7.57"
	UserAgent = "cos-go-sdk-v5/" + Version

	XOptionalKey = "cos-go-sdk-v5-XOptionalKey"
)

Variables

View Source
var ACL = &aclEnum{
	Private:                "private",
	PublicRead:             "public-read",
	PublicReadWrite:        "public-read-write",
	AuthenticatedRead:      "authenticated-read",
	Default:                "default",
	BucketOwnerRead:        "bucket-owner-read",
	BucketOwnerFullControl: "bucket-owner-full-control",
}
View Source
var DNSScatterDialContext = DNSScatterDialContextFunc
View Source
var DNSScatterTransport = &http.Transport{
	Proxy:                 http.ProxyFromEnvironment,
	DialContext:           DNSScatterDialContext,
	MaxIdleConns:          100,
	IdleConnTimeout:       60 * time.Second,
	TLSHandshakeTimeout:   10 * time.Second,
	ExpectContinueTimeout: 1 * time.Second,
}
View Source
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,
	"cache-control":                  true,
	"content-disposition":            true,
	"content-encoding":               true,
	"content-type":                   true,
	"content-length":                 true,
	"content-md5":                    true,
	"transfer-encoding":              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,
	"pic-operations":                 true,
}

需要校验的 Headers 列表

View Source
var (
	ObjectKeySimplifyCheckErr = fmt.Errorf("The Getobject Key is illegal")
)

Functions

func AddAuthorizationHeader

func AddAuthorizationHeader(secretID, secretKey string, sessionToken string, req *http.Request, authTime *AuthTime)

AddAuthorizationHeader 给 req 增加签名信息

func CheckObjectKeySimplify added in v0.7.48

func CheckObjectKeySimplify(key string) bool

func CheckReaderLen added in v0.7.16

func CheckReaderLen(reader io.Reader) error

func DNSScatterDialContextFunc added in v0.7.35

func DNSScatterDialContextFunc(ctx context.Context, network string, addr string) (conn net.Conn, err error)

func DecodeURIComponent added in v0.7.11

func DecodeURIComponent(s string) (string, error)

func DividePart

func DividePart(fileSize int64, last int) (int64, int64)

func EncodePicOperations

func EncodePicOperations(pic *PicOperations) string

func EncodeURIComponent added in v0.7.11

func EncodeURIComponent(s string) string

func FormatRangeOptions added in v0.7.25

func FormatRangeOptions(opt *RangeOptions) string

func GetBucketRegionFromUrl added in v0.7.55

func GetBucketRegionFromUrl(u *url.URL) (string, string)

func GetReaderLen added in v0.7.13

func GetReaderLen(reader io.Reader) (length int64, err error)

func HttpDefaultCheckRedirect added in v0.7.56

func HttpDefaultCheckRedirect(req *http.Request, via []*http.Request) error

go http default CheckRedirect

func IsLenReader added in v0.7.23

func IsLenReader(reader io.Reader) bool

func IsNotFoundError

func IsNotFoundError(e error) bool

func LimitReadCloser added in v0.7.23

func LimitReadCloser(r io.Reader, n int64) io.Reader

func NewBucketURL

func NewBucketURL(bucketName, region string, secure bool) (*url.URL, error)

NewBucketURL 生成 BaseURL 所需的 BucketURL

bucketName: bucket名称, bucket的命名规则为{name}-{appid} ,此处填写的存储桶名称必须为此格式
Region: 区域代码: ap-beijing-1,ap-beijing,ap-shanghai,ap-guangzhou...
secure: 是否使用 https

func SetNeedSignHeaders added in v0.7.32

func SetNeedSignHeaders(key string, val bool)

非线程安全,只能在进程初始化(而不是Client初始化)时做设置

func TeeReader added in v0.7.13

func TeeReader(reader io.Reader, writer io.Writer, total int64, listener ProgressListener) *teeReader

func UnmarshalCompleteMultiUploadResult added in v0.7.47

func UnmarshalCompleteMultiUploadResult(data []byte, res *CompleteMultipartUploadResult) error

func UnmarshalInitMultiUploadResult added in v0.7.47

func UnmarshalInitMultiUploadResult(data []byte, res *InitiateMultipartUploadResult) error

Types

type ACLGrant

type ACLGrant struct {
	Grantee    *ACLGrantee
	Permission string
}

ACLGrant is the param of ACLXml

type ACLGrantee

type ACLGrantee struct {
	TypeAttr    xml.Attr `xml:",attr,omitempty"`
	Type        string   `xml:"type,attr,omitempty"`
	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 AIBodyRecognitionOptions added in v0.7.42

type AIBodyRecognitionOptions struct {
	CIProcess string `url:"ci-process,omitempty"`
	DetectUrl string `url:"detect-url,omitempty"`
}

AIBodyRecognitionOptions is the option of AIBodyRecognitionWithOpt

type AIBodyRecognitionResult added in v0.7.42

type AIBodyRecognitionResult struct {
	XMLName        xml.Name         `xml:"RecognitionResult"`
	Status         int              `xml:"Status,omitempty"`
	PedestrianInfo []PedestrianInfo `xml:"PedestrianInfo,omitempty"`
}

type AIEnhanceImageOptions added in v0.7.46

type AIEnhanceImageOptions struct {
	DetectUrl   string `url:"detect-url,omitempty"`
	Senoise     int    `url:"denoise,omitempty"`
	Sharpen     int    `url:"sharpen,omitempty"`
	IgnoreError int    `url:"ignore-error,omitempty"`
}

AIEnhanceImageOptions 图像增强选项

type AIGameRecOptions added in v0.7.46

type AIGameRecOptions struct {
	DetectUrl string `url:"detect-url,omitempty"`
}

type AIGameRecResult added in v0.7.46

type AIGameRecResult struct {
	XMLName    xml.Name `xml:"RecognitionResult"`
	GameLabels *struct {
		Confidence     int    `xml:"Confidence,omitempty"`
		FirstCategory  string `xml:"FirstCategory,omitempty"`
		SecondCategory string `xml:"SecondCategory,omitempty"`
		GameName       string `xml:"GameName,omitempty"`
	} `xml:"GameLabels,omitempty"`
}

type AIImageColoringOptions added in v0.7.46

type AIImageColoringOptions struct {
	DetectUrl string `url:"detect-url,omitempty"`
}

AIImageColoringOptions TODO

type AIImageCropOptions added in v0.7.42

type AIImageCropOptions struct {
	DetectUrl   string `url:"detect-url,omitempty"`
	Width       int    `url:"width,omitempty"`
	Height      int    `url:"height,omitempty"`
	Fixed       int    `url:"fixed,omitempty"`
	IgnoreError int    `url:"ignore-error,omitempty"`
}

AIImageCropOptions 图像智能裁剪选项

type AILicenseRecOptions added in v0.7.44

type AILicenseRecOptions struct {
	DetectUrl string `url:"detect-url,omitempty"`
	CardType  string `url:"CardType,omitempty"`
}

type AILicenseRecResult added in v0.7.44

type AILicenseRecResult struct {
	XMLName xml.Name `xml:"Response"`
	Status  int      `xml:"Status,omitempty"`
	IdInfo  []struct {
		Name         string `xml:"Name,omitempty"`
		DetectedText string `xml:"DetectedText,omitempty"`
		Score        int    `xml:"Score,omitempty"`
		Location     struct {
			Point []string `xml:"Point,omitempty"`
		} `xml:"Location,omitempty"`
	} `xml:"IdInfo,omitempty"`
}

type AIObjectDetectOptions added in v0.7.44

type AIObjectDetectOptions struct {
	DetectUrl string `url:"detect-url,omitempty"`
}

type AIObjectDetectResult added in v0.7.44

type AIObjectDetectResult struct {
	XMLName        xml.Name `xml:"RecognitionResult"`
	Status         int      `xml:"Status,omitempty"`
	DetectMultiObj []struct {
		Name       string `xml:"Name,omitempty"`
		Confidence int    `xml:"Confidence,omitempty"`
		Location   struct {
			X      int `xml:"X,omitempty"`
			Y      int `xml:"Y,omitempty"`
			Width  int `xml:"Width,omitempty"`
			Height int `xml:"Height,omitempty"`
		} `xml:"Location,omitempty"`
	} `xml:"DetectMultiObj,omitempty"`
}

type AIPicMattingOptions added in v0.7.53

type AIPicMattingOptions struct {
	DetectUrl     string      `url:"detect-url, omitempty" json:"-"`     // 您可以通过填写 detect-url 处理任意公网可访问的图片链接。不填写 detect-url 时,后台会默认处理 ObjectKey ,填写了 detect-url 时,后台会处理 detect-url 链接,无需再填写 ObjectKey detect-url 示例:http://www.example.com/abc.jpg ,需要进行 UrlEncode,处理后为http%25253A%25252F%25252Fwww.example.com%25252Fabc.jpg。
	CenterLayout  int         `url:"center-layout, omitempty" json:"-"`  // 抠图主体居中显示;值为1时居中显示,值为0不做处理,默认为0
	PaddingLayout string      `url:"padding-layout, omitempty" json:"-"` // 将处理后的图片四边进行留白,形式为 padding-layout=<dx>x<dy>,左右两边各进行 dx 像素的留白,上下两边各进行 dy 像素的留白,例如:padding-layout=20x10默认不进行留白操作,dx、dy 最大值为1000像素。
	OptHeaders    *OptHeaders `header:"-, omitempty" url:"-" json:"-" xml:"-"`
}

type AIPortraitMattingOptions added in v0.7.53

type AIPortraitMattingOptions struct {
	DetectUrl     string      `url:"detect-url, omitempty" json:"-"`     // 您可以通过填写 detect-url 处理任意公网可访问的图片链接。不填写 detect-url 时,后台会默认处理 ObjectKey ,填写了 detect-url 时,后台会处理 detect-url 链接,无需再填写 ObjectKey。 detect-url 示例:http://www.example.com/abc.jpg,需要进行 UrlEncode,处理后为http%25253A%25252F%25252Fwww.example.com%25252Fabc.jpg。
	CenterLayout  int         `url:"center-layout, omitempty" json:"-"`  // 抠图主体居中显示;值为1时居中显示,值为0不做处理,默认为0
	PaddingLayout string      `url:"padding-layout, omitempty" json:"-"` // 将处理后的图片四边进行留白,形式为 padding-layout=x,左右两边各进行 dx 像素的留白,上下两边各进行 dy 像素的留白,例如:padding-layout=20x10默认不进行留白操作,dx、dy最大值为1000像素。
	OptHeaders    *OptHeaders `header:"-, omitempty" url:"-" json:"-" xml:"-"`
}

type AIRecognitionOptions added in v0.7.55

type AIRecognitionOptions struct {
	DetectType string      `url:"detect-type, omitempty" json:"-"`
	OptHeaders *OptHeaders `header:"-, omitempty" url:"-" json:"-" xml:"-"`
}

type AIRecognitionResult added in v0.7.55

type AIRecognitionResult struct {
	XMLName xml.Name `xml:"Response" json:"response,omitempty"`
	// BodyJointsDetect struct {
	// 	BodyJointsResults []struct {
	// 		BodyJoints []struct {
	// 			KeyPointType string `xml:"KeyPointType"`
	// 			X            string `xml:"X"`
	// 			Y            string `xml:"Y"`
	// 		} `xml:"BodyJoints" json:"bodyjoints,omitempty"`
	// 		BoundBox struct {
	// 			Height string `xml:"Height"`
	// 			Width  string `xml:"Width"`
	// 			X      string `xml:"X"`
	// 			Y      string `xml:"Y"`
	// 		} `xml:"BoundBox" json:"boundbox,omitempty"`
	// 		Confidence string `xml:"Confidence"`
	// 	} `xml:"BodyJointsResults" json:"bodyjointsresults,omitempty"`
	// 	RequestId string `xml:"RequestId"`
	// } `xml:"BodyJointsDetect" json:"bodyjointsdetect,omitempty"`
	// DetectLabel struct {
	// 	Labels []struct {
	// 		Confidence string `xml:"Confidence"`
	// 		Name       string `xml:"Name"`
	// 	} `xml:"Labels" json:"labels,omitempty"`
	// } `xml:"DetectLabel" json:"detectlabel,omitempty"`
	// OCR struct {
	// 	Angel          string `xml:"Angel"`
	// 	Language       string `xml:"Language"`
	// 	PdfPageSize    string `xml:"PdfPageSize"`
	// 	RequestId      string `xml:"RequestId"`
	// 	TextDetections []struct {
	// 		Confidence   string `xml:"Confidence"`
	// 		DetectedText string `xml:"DetectedText"`
	// 		ItemPolygon  struct {
	// 			Height string `xml:"Height"`
	// 			Width  string `xml:"Width"`
	// 			X      string `xml:"X"`
	// 			Y      string `xml:"Y"`
	// 		} `xml:"ItemPolygon" json:"itempolygon,omitempty"`
	// 		Polygon []struct {
	// 			X string `xml:"X"`
	// 			Y string `xml:"Y"`
	// 		} `xml:"Polygon" json:"polygon,omitempty"`
	// 		Words string `xml:"Words"`
	// 	} `xml:"TextDetections" json:"textdetections,omitempty"`
	// } `xml:"OCR" json:"ocr,omitempty"`
	// EnhanceImage struct {
	// 	EnhancedImage string `xml:"EnhancedImage"`
	// } `xml:"EnhanceImage" json:"enhanceimage,omitempty"`
	DetectVehicle struct {
		Vehicles []struct {
			Location struct {
				Height int `xml:"Height"`
				Width  int `xml:"Width"`
				X      int `xml:"X"`
				Y      int `xml:"Y"`
			} `xml:"Location" json:"location,omitempty"`
			Name  string `xml:"Name"`
			Score int    `xml:"Score"`
		} `xml:"Vehicles" json:"vehicles,omitempty"`
	} `xml:"DetectVehicle" json:"detectvehicle,omitempty"`
	DetectPedestrian struct {
		Pedestrians []struct {
			Location struct {
				Height int `xml:"Height"`
				Width  int `xml:"Width"`
				X      int `xml:"X"`
				Y      int `xml:"Y"`
			} `xml:"Location" json:"location,omitempty"`
			Name  string `xml:"Name"`
			Score int    `xml:"Score"`
		} `xml:"Pedestrians" json:"pedestrians,omitempty"`
	} `xml:"DetectPedestrian" json:"detectpedestrian,omitempty"`
	DetectPet struct {
		Pets []struct {
			Location struct {
				Height int `xml:"Height"`
				Width  int `xml:"Width"`
				X      int `xml:"X"`
				Y      int `xml:"Y"`
			} `xml:"Location" json:"location,omitempty"`
			Name  string `xml:"Name"`
			Score int    `xml:"Score"`
		} `xml:"Pets" json:"pets,omitempty"`
	} `xml:"DetectPet" json:"detectpet,omitempty"`
}

type AISuperResolutionOptions added in v0.7.46

type AISuperResolutionOptions struct {
	DetectUrl string `url:"detect-url,omitempty"`
}

AIImageColoringOptions TODO

type ASRJobDetail added in v0.7.34

type ASRJobDetail 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    *ASRJobOperation `xml:"Operation,omitempty"`
}

ASRJobDetail TODO

type ASRJobOperation added in v0.7.34

type ASRJobOperation struct {
	Tag                     string                   `xml:"Tag,omitempty"`
	Output                  *JobOutput               `xml:"Output,omitempty"`
	SpeechRecognition       *SpeechRecognition       `xml:"SpeechRecognition,omitempty"`
	SpeechRecognitionResult *SpeechRecognitionResult `xml:"SpeechRecognitionResult,omitempty"`
	SoundHoundResult        *SoundHoundResult        `xml:"SoundHoundResult,omitempty"`
	TemplateId              string                   `xml:"TemplateId,omitempty"`
	UserData                string                   `xml:"UserData,omitempty"`
	JobLevel                int                      `xml:"JobLevel,omitempty"`
}

ASRJobOperation TODO

type AbortMultipartUploadOptions added in v0.7.51

type AbortMultipartUploadOptions struct {
	XOptionHeader *http.Header `header:"-,omitempty" url:"-" xml:"-"`
}

type AddImageOptions added in v0.7.42

type AddImageOptions struct {
	XMLName       xml.Name `xml:"Request"`
	EntityId      string   `xml:"EntityId,omitempty"`
	CustomContent string   `xml:"CustomContent,omitempty"`
	Tags          string   `xml:"Tags,omitempty"`
}

AddImageOptions 添加图库图片选项

type AddStyleOptions added in v0.7.36

type AddStyleOptions struct {
	XMLName   xml.Name `xml:"AddStyle"`
	StyleName string   `xml:"StyleName,omitempty"`
	StyleBody string   `xml:"StyleBody,omitempty"`
}

type Aggregations added in v0.7.47

type Aggregations struct {
	Operation  string      `json:"Operation, omitempty" url:"-" ` //  聚合字段的操作符。枚举值:min:最小值。max:最大值。average:平均数sum:求和。count:计数。distinct:去重计数。group:分组计数,按照分组计数结果从高到低排序。
	Field      string      `json:"Field, omitempty" url:"-" `     // 字段名称。关于支持的字段,请参考字段和操作符的支持列表。
	OptHeaders *OptHeaders `header:"-, omitempty" url:"-" json:"-" xml:"-"`
}

type AggregationsResult added in v0.7.51

type AggregationsResult struct {
	Operation string    `json:"Operation"` //  聚合字段的聚合操作符。
	Value     float64   `json:"Value"`     //  聚合的统计结果。
	Groups    []*Groups `json:"Groups"`    //  分组聚合的结果列表。仅在请求的Aggregations中存在group类型的Operation时才会返回。
	Field     string    `json:"Field"`     // 聚合字段名称。
}

type Animation added in v0.7.32

type Animation struct {
	Container    *Container      `xml:"Container,omitempty"`
	Video        *AnimationVideo `xml:"Video,omitempty"`
	TimeInterval *TimeInterval   `xml:"TimeInterval,omitempty"`
}

Animation TODO

type AnimationVideo added in v0.7.32

type AnimationVideo struct {
	Codec                      string `xml:"Codec,omitempty"`
	Width                      string `xml:"Width,omitempty"`
	Height                     string `xml:"Height,omitempty"`
	Fps                        string `xml:"Fps,omitempty"`
	AnimateOnlyKeepKeyFrame    string `xml:"AnimateOnlyKeepKeyFrame,omitempty"`
	AnimateTimeIntervalOfFrame string `xml:"AnimateTimeIntervalOfFrame,omitempty"`
	AnimateFramesPerSecond     string `xml:"AnimateFramesPerSecond,omitempty"`
	Quality                    string `xml:"Quality,omitempty"`
}

AnimationVideo TODO 有意和转码区分,两种任务关注的参数不一样避免干扰

type AssessQualityResults added in v0.7.42

type AssessQualityResults struct {
	XMLName        xml.Name `xml:"Response"`
	LongImage      bool     `xml:"LongImage"`
	BlackAndWhite  bool     `xml:"BlackAndWhite"`
	SmallImage     bool     `xml:"SmallImage"`
	BigImage       bool     `xml:"BigImage"`
	PureImage      bool     `xml:"PureImage"`
	ClarityScore   int      `xml:"ClarityScore"`
	AestheticScore int      `xml:"AestheticScore"`
	RequestId      string   `xml:"RequestId"`
}

AssessQualityResults Logo识别结果

type Audio added in v0.7.21

type Audio struct {
	Codec         string `xml:"Codec,omitempty"`
	Samplerate    string `xml:"Samplerate,omitempty"`
	Bitrate       string `xml:"Bitrate,omitempty"`
	Channels      string `xml:"Channels,omitempty"`
	Remove        string `xml:"Remove,omitempty"`
	KeepTwoTracks string `xml:"KeepTwoTracks,omitempty"`
	SwitchTrack   string `xml:"SwitchTrack,omitempty"`
	SampleFormat  string `xml:"SampleFormat,omitempty"`
}

Audio TODO

type AudioAuditingJobConf added in v0.7.25

type AudioAuditingJobConf struct {
	DetectType      string      `xml:",omitempty"`
	Callback        string      `xml:",omitempty"`
	CallbackVersion string      `xml:",omitempty"`
	CallbackType    int         `xml:",omitempty"`
	BizType         string      `xml:",omitempty"`
	Freeze          *FreezeConf `xml:",omitempty"`
}

AudioAuditingJobConf is the config of PutAudioAuditingJobOptions

type AudioAuditingJobDetail added in v0.7.31

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"`
	TeenagerInfo    *RecognitionInfo     `xml:",omitempty"`
	LanguageResults []LanguageResult     `xml:",omitempty"`
	Section         []AudioSectionResult `xml:",omitempty"`
	UserInfo        *UserExtraInfo       `xml:",omitempty"`
	ListInfo        *UserListInfo        `xml:",omitempty"`
	ForbidState     int                  `xml:",omitempty"`
}

AudioAuditingJobDetail is the detail of GetAudioAuditingJobResult

type AudioConfig added in v0.7.34

type AudioConfig struct {
	Codec      string `xml:"Codec"`
	Samplerate string `xml:"Samplerate"`
	Bitrate    string `xml:"Bitrate"`
	Channels   string `xml:"Channels"`
}

AudioConfig TODO

type AudioMix added in v0.7.35

type AudioMix struct {
	AudioSource  string        `xml:"AudioSource,omitempty"`
	MixMode      string        `xml:"MixMode,omitempty"`
	Replace      string        `xml:"Replace,omitempty"`
	EffectConfig *EffectConfig `xml:"EffectConfig,omitempty"`
}

AudioMix TODO

type AudioSectionResult added in v0.7.31

type AudioSectionResult struct {
	Url             string           `xml:",omitempty"`
	Text            string           `xml:",omitempty"`
	OffsetTime      int              `xml:",omitempty"`
	Duration        int              `xml:",omitempty"`
	Label           string           `xml:",omitempty"`
	SubLabel        string           `xml:",omitempty"`
	Result          int              `xml:",omitempty"`
	PornInfo        *RecognitionInfo `xml:",omitempty"`
	TerrorismInfo   *RecognitionInfo `xml:",omitempty"`
	PoliticsInfo    *RecognitionInfo `xml:",omitempty"`
	AdsInfo         *RecognitionInfo `xml:",omitempty"`
	TeenagerInfo    *RecognitionInfo `xml:",omitempty"`
	LanguageResults []LanguageResult `xml:",omitempty"`
}

AudioSectionResult is the audio section result of AuditingJobDetail/AudioAuditingJobDetail

type AuditingJobDetail added in v0.7.25

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"`
	SubLabel      string                        `xml:",omitempty"`
	Result        int                           `xml:",omitempty"`
	PornInfo      *RecognitionInfo              `xml:",omitempty"`
	TerrorismInfo *RecognitionInfo              `xml:",omitempty"`
	PoliticsInfo  *RecognitionInfo              `xml:",omitempty"`
	AdsInfo       *RecognitionInfo              `xml:",omitempty"`
	TeenagerInfo  *RecognitionInfo              `xml:",omitempty"`
	Snapshot      []GetVideoAuditingJobSnapshot `xml:",omitempty"`
	AudioSection  []AudioSectionResult          `xml:",omitempty"`
	UserInfo      *UserExtraInfo                `xml:",omitempty"`
	Type          string                        `xml:",omitempty"`
	ListInfo      *UserListInfo                 `xml:",omitempty"`
	ForbidState   int                           `xml:",omitempty"`
	MaskInfo      *AuditingMaskInfo             `xml:",omitempty"`
}

AuditingJobDetail is the detail of GetVideoAuditingJobResult

type AuditingMask added in v0.7.42

type AuditingMask struct {
	Images     []AuditingMaskImages    `xml:",omitempty"`
	Audios     []AuditingMaskAudios    `xml:",omitempty"`
	CosOutput  *AuditingMaskCosOutput  `xml:",omitempty"`
	LiveOutput *AuditingMaskLiveOutput `xml:",omitempty"`
}

AuditingMask is auto Mask options

type AuditingMaskAudios added in v0.7.42

type AuditingMaskAudios struct {
	Label string `xml:",omitempty"`
	Type  string `xml:",omitempty"`
}

AuditingMaskAudios 审核马赛克相关参数

type AuditingMaskCosOutput added in v0.7.42

type AuditingMaskCosOutput struct {
	Region    string     `xml:"Region,omitempty"`
	Bucket    string     `xml:"Bucket,omitempty"`
	Object    string     `xml:"Object,omitempty"`
	Transcode *Transcode `xml:",omitempty"`
}

AuditingMaskCosOutput 审核马赛克相关参数

type AuditingMaskImages added in v0.7.42

type AuditingMaskImages struct {
	Label string `xml:",omitempty"`
	Type  string `xml:",omitempty"`
	Url   string `xml:",omitempty"`
}

AuditingMaskImages 审核马赛克相关参数

type AuditingMaskInfo added in v0.7.42

type AuditingMaskInfo struct {
	RecordInfo *AuditingMaskRecordInfo `xml:",omitempty"`
	LiveInfo   *AuditingMaskLiveInfo   `xml:",omitempty"`
}

AuditingMaskInfo 审核马赛克信息

type AuditingMaskLiveInfo added in v0.7.42

type AuditingMaskLiveInfo struct {
	StartTime string `xml:"StartTime,omitempty"`
	EndTime   string `xml:"EndTime,omitempty"`
	Output    string `xml:"Output,omitempty"`
}

AuditingMaskInfo 审核马赛克信息

type AuditingMaskLiveOutput added in v0.7.42

type AuditingMaskLiveOutput struct {
	Url       string     `xml:"Url,omitempty"`
	Transcode *Transcode `xml:",omitempty"`
}

AuditingMaskLiveOutput 审核马赛克相关参数

type AuditingMaskRecordInfo added in v0.7.42

type AuditingMaskRecordInfo struct {
	Code    string `xml:"Code,omitempty"`
	Message string `xml:"Message,omitempty"`
	Output  *struct {
		Region string `xml:"Region,omitempty"`
		Bucket string `xml:"Bucket,omitempty"`
		Object string `xml:"Object,omitempty"`
	} `xml:"Output,omitempty"`
}

AuditingMaskInfo 审核马赛克信息

type AuthTime

type AuthTime struct {
	SignStartTime time.Time
	SignEndTime   time.Time
	KeyStartTime  time.Time
	KeyEndTime    time.Time
}

AuthTime 用于生成签名所需的 q-sign-time 和 q-key-time 相关参数

func NewAuthTime

func NewAuthTime(expire time.Duration) *AuthTime

NewAuthTime 生成 AuthTime 的便捷函数

expire: 从现在开始多久过期.

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) RoundTrip

func (t *AuthorizationTransport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implements the RoundTripper interface.

func (*AuthorizationTransport) SetCredential

func (t *AuthorizationTransport) SetCredential(ak, sk, token string)

SetCredential update the SecretID(ak), SercretKey(sk), sessiontoken

type AutoAddressing added in v0.7.43

type AutoAddressing struct {
	Status string `xml:"Status,omitempty"`
}

type AutoTranslationBlockOptions added in v0.7.42

type AutoTranslationBlockOptions struct {
	InputText  string `url:"InputText,omitempty"`
	SourceLang string `url:"SourceLang,omitempty"`
	TargetLang string `url:"TargetLang,omitempty"`
	TextDomain string `url:"TextDomain,omitempty"`
	TextStyle  string `url:"TextStyle,omitempty"`
}

AutoTranslationBlockOptions 实时文字翻译

type AutoTranslationBlockResults added in v0.7.42

type AutoTranslationBlockResults struct {
	XMLName           xml.Name `xml:"TranslationResult"`
	TranslationResult string   `xml:",chardata"`
}

AutoTranslationBlockResults 实时文字翻译选项

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
	// 访问 MetaInsight 的基础 URL
	MetaInsightURL *url.URL
}

BaseURL 访问各 API 所需的基础 URL

func (*BaseURL) Check added in v0.7.56

func (u *BaseURL) Check() bool

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 BatchCOSTag added in v0.7.42

type BatchCOSTag struct {
	Key   string `xml:"Key,omitempty" header:"-" url:"-"`
	Value string `xml:"Value,omitempty" header:"-" url:"-"`
}

BatchJobOperationCopy

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 BatchCreateJobResult struct {
	XMLName xml.Name `xml:"CreateJobResult"`
	JobId   string   `xml:"JobId,omitempty"`
}

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 BatchGrantee struct {
	DisplayName    string `xml:"DisplayName,omitempty" header:"-" url:"-"`
	Identifier     string `xml:"Identifier" header:"-" url:"-"`
	TypeIdentifier string `xml:"TypeIdentifier" header:"-" url:"-"`
}

type BatchImageAuditingJobResult added in v0.7.33

type BatchImageAuditingJobResult struct {
	XMLName    xml.Name              `xml:"Response"`
	JobsDetail []ImageAuditingResult `xml:",omitempty"`
	RequestId  string                `xml:",omitempty"`
}

BatchImageAuditingJobResult is the result of BatchImageAuditing

type BatchImageAuditingOptions added in v0.7.33

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 BatchJobFailureReasons struct {
	FailureCode   string `xml:"FailureCode" header:"-" url:"-"`
	FailureReason string `xml:"FailureReason" header:"-" url:"-"`
}

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 BatchJobManifestSpec struct {
	Fields []string `xml:"Fields>member,omitempty" header:"-" url:"-"`
	Format string   `xml:"Format" header:"-" url:"-"`
}

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 {
	AccessControlDirective    string                    `xml:"AccessControlDirective,omitempty" header:"-" url:"-"`
	AccessControlGrants       *BatchAccessControlGrants `xml:"AccessControlGrants,omitempty" header:"-" url:"-"`
	CannedAccessControlList   string                    `xml:"CannedAccessControlList,omitempty" header:"-" url:"-"`
	PrefixReplace             bool                      `xml:"PrefixReplace,omitempty" header:"-" url:"-"`
	ResourcesPrefix           string                    `xml:"ResourcesPrefix,omitempty" header:"-" url:"-"`
	TargetKeyPrefix           string                    `xml:"TargetKeyPrefix,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:"-"`
	TaggingDirective          string                    `xml:"TaggingDirective,omitempty" header:"-" url:"-"`
	NewObjectTagging          *BatchNewObjectTagging    `xml:"NewObjectTagging,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 BatchListJobsOptions struct {
	JobStatuses string `url:"jobStatuses,omitempty" header:"-" xml:"-"`
	MaxResults  int    `url:"maxResults,omitempty" header:"-" xml:"-"`
	NextToken   string `url:"nextToken,omitempty" header:"-" xml:"-"`
}

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:"-"`
}

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 BatchNewObjectTagging added in v0.7.42

type BatchNewObjectTagging struct {
	COSTag []BatchCOSTag `xml:"COSTag,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 BatchRequestHeaders struct {
	XCosAppid     int          `header:"x-cos-appid" xml:"-" url:"-"`
	ContentLength string       `header:"Content-Length,omitempty" xml:"-" url:"-"`
	ContentType   string       `header:"Content-Type,omitempty" xml:"-" url:"-"`
	Headers       *http.Header `header:"-" xml:"-" url:"-"`
}

type BatchService

type BatchService service

func (*BatchService) CreateJob

func (*BatchService) DeleteJob added in v0.7.42

func (s *BatchService) DeleteJob(ctx context.Context, id string, headers *BatchRequestHeaders) (*Response, error)

func (*BatchService) DescribeJob

func (*BatchService) ListJobs

func (*BatchService) UpdateJobPriority

func (*BatchService) UpdateJobStatus

type BatchUpdatePriorityOptions

type BatchUpdatePriorityOptions struct {
	JobId    string `url:"-" header:"-" xml:"-"`
	Priority int    `url:"priority" header:"-" xml:"-"`
}

type BatchUpdatePriorityResult

type BatchUpdatePriorityResult struct {
	XMLName  xml.Name `xml:"UpdateJobPriorityResult"`
	JobId    string   `xml:"JobId,omitempty"`
	Priority int      `xml:"Priority,omitempty"`
}

type BatchUpdateStatusOptions

type BatchUpdateStatusOptions struct {
	JobId              string `header:"-" url:"-" xml:"-"`
	RequestedJobStatus string `url:"requestedJobStatus" header:"-" xml:"-"`
	StatusUpdateReason string `url:"statusUpdateReason,omitempty" header:"-" xml:"-"`
}

type BatchUpdateStatusResult

type BatchUpdateStatusResult struct {
	XMLName            xml.Name `xml:"UpdateJobStatusResult"`
	JobId              string   `xml:"JobId,omitempty"`
	Status             string   `xml:"Status,omitempty"`
	StatusUpdateReason string   `xml:"StatusUpdateReason,omitempty"`
}

type Binding added in v0.7.47

type Binding struct {
	URI         string `json:"URI"`         //  资源标识字段,表示需要与数据集绑定的资源,当前仅支持COS存储桶,字段规则:cos://,其中BucketName表示COS存储桶名称,例如:cos://examplebucket-1250000000
	State       string `json:"State"`       //  数据集和 COS Bucket绑定关系的状态。取值范围如下:Running:绑定关系运行中。
	StockState  string `json:"StockState"`  //  当前绑定的存储桶对应的存量索引的状态:有效值:NoIndexing(未进行存量建立索引)、Indexing(存量索引建立中)、Success(存量索引已建立完成)。
	CreateTime  string `json:"CreateTime"`  //  数据集和 COS Bucket绑定关系创建时间的时间戳,格式为RFC3339Nano。
	UpdateTime  string `json:"UpdateTime"`  //  数据集和 COS Bucket的绑定关系修改时间的时间戳,格式为RFC3339Nano。创建绑定关系后,如果未暂停或者未重启过绑定关系,则绑定关系修改时间的时间戳和绑定关系创建时间的时间戳相同。
	DatasetName string `json:"DatasetName"` // 数据集名称。
	Detail      string `json:"Detail"`      // 详情
}

type BodyRecognition added in v0.7.42

type BodyRecognition struct {
	Time     string                `xml:"Time,omitempty"`
	Url      string                `xml:"Url,omitempty"`
	BodyInfo []*VideoTargetRecInfo `xml:"BodyInfo,omitempty"`
}

BodyRecognition TODO

type Bucket

type Bucket struct {
	Name         string
	Region       string `xml:"Location,omitempty"`
	CreationDate string `xml:",omitempty"`
	BucketType   string `xml:",omitempty"`
}

Bucket is the meta info of Bucket

type BucketAccessFrequency added in v0.7.52

type BucketAccessFrequency struct {
	AccessCountLessThan int `xml:"AccessCountLessThan,omitempty" header:"-"`
	RecentDays          int `xml:"RecentDays,omitempty" header:"-"`
}

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 BucketDeleteDomainCertificateOptions added in v0.7.37

type BucketDeleteDomainCertificateOptions BucketGetDomainCertificateOptions

type BucketDeleteDomainOptions added in v0.7.55

type BucketDeleteDomainOptions struct {
	XOptionHeader *http.Header `header:"-,omitempty" url:"-" xml:"-"`
}

type BucketDeleteLifecycleOptions added in v0.7.36

type BucketDeleteLifecycleOptions struct {
	XOptionHeader *http.Header `header:"-,omitempty" url:"-" xml:"-"`
}

type BucketDeleteOptions added in v0.7.39

type BucketDeleteOptions struct {
	XOptionHeader *http.Header `header:"-,omitempty" url:"-" xml:"-"`
}

type BucketDomainCertificateInfo added in v0.7.37

type BucketDomainCertificateInfo struct {
	CertType   string                  `xml:"CertType,omitempty"`
	CustomCert *BucketDomainCustomCert `xml:"CustomCert,omitempty"`
}

type BucketDomainCustomCert added in v0.7.37

type BucketDomainCustomCert struct {
	Cert       string `xml:"Cert,omitempty"`
	PrivateKey string `xml:"PrivateKey,omitempty"`
}

type BucketDomainRule added in v0.7.31

type BucketDomainRule struct {
	Status            string `xml:"Status,omitempty"`
	Name              string `xml:"Name,omitempty"`
	Type              string `xml:"Type,omitempty"`
	ForcedReplacement string `xml:"ForcedReplacement,omitempty"`
}

type BucketEncryptionConfiguration added in v0.7.4

type BucketEncryptionConfiguration struct {
	SSEAlgorithm   string `xml:"SSEAlgorithm"`
	KMSMasterKeyID string `xml:"KMSMasterKeyID,omitempty"`
}

type BucketGetACLResult

type BucketGetACLResult = ACLXml

BucketGetACLResult is same to the ACLXml

type BucketGetAccelerateResult added in v0.7.16

type BucketGetAccelerateResult BucketPutAccelerateOptions

type BucketGetCORSResult

type BucketGetCORSResult struct {
	XMLName      xml.Name         `xml:"CORSConfiguration"`
	Rules        []BucketCORSRule `xml:"CORSRule,omitempty"`
	ResponseVary string           `xml:"ResponseVary,omitempty"`
}

BucketGetCORSResult is the result of GetBucketCORS

type BucketGetDomainCertificateOptions added in v0.7.37

type BucketGetDomainCertificateOptions struct {
	DomainName string `url:"domainname"`
}

type BucketGetDomainCertificateResult added in v0.7.37

type BucketGetDomainCertificateResult struct {
	XMLName xml.Name `xml:"DomainCertificate"`
	Status  string   `xml:"Status,omitempty"`
}

type BucketGetDomainOptions added in v0.7.55

type BucketGetDomainOptions struct {
	XOptionHeader *http.Header `header:"-,omitempty" url:"-" xml:"-"`
}

type BucketGetDomainResult

type BucketGetDomainResult BucketPutDomainOptions

type BucketGetEncryptionResult added in v0.7.4

type BucketGetEncryptionResult BucketPutEncryptionOptions

type BucketGetIntelligentTieringOptions added in v0.7.40

type BucketGetIntelligentTieringOptions struct {
	XOptionHeader *http.Header `header:"-,omitempty" url:"-" xml:"-"`
}

type BucketGetIntelligentTieringResult added in v0.7.9

type BucketGetIntelligentTieringResult BucketPutIntelligentTieringOptions

type BucketGetInventoryResult

type BucketGetInventoryResult BucketPutInventoryOptions

BucketGetInventoryResult same struct to options

type BucketGetLifecycleOptions added in v0.7.36

type BucketGetLifecycleOptions struct {
	XOptionHeader *http.Header `header:"-,omitempty" url:"-" xml:"-"`
}

type BucketGetLifecycleResult

type BucketGetLifecycleResult struct {
	XMLName xml.Name              `xml:"LifecycleConfiguration" header:"-"`
	Rules   []BucketLifecycleRule `xml:"Rule,omitempty" header:"-"`
}

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 BucketGetMetadataResult added in v0.7.55

type BucketGetMetadataResult struct {
	BucketUrl          string
	BucketName         string
	Location           string
	MAZ                bool
	OFS                bool
	Encryption         *BucketGetEncryptionResult
	ACL                *BucketGetACLResult
	Website            *BucketGetWebsiteResult
	Logging            *BucketGetLoggingResult
	CORS               *BucketGetCORSResult
	Versioning         *BucketGetVersionResult
	Lifecycle          *BucketGetLifecycleResult
	IntelligentTiering *ListIntelligentTieringConfigurations
	Tagging            *BucketGetTaggingResult
	ObjectLock         *BucketGetObjectLockResult
	Replication        *BucketGetReplicationResult
}

type BucketGetObjectLockResult added in v0.7.42

type BucketGetObjectLockResult BucketPutObjectLockOptions

type BucketGetObjectVersionsOptions added in v0.7.6

type BucketGetObjectVersionsOptions struct {
	Prefix          string       `url:"prefix,omitempty" header:"-"`
	Delimiter       string       `url:"delimiter,omitempty" header:"-"`
	EncodingType    string       `url:"encoding-type,omitempty" header:"-"`
	KeyMarker       string       `url:"key-marker,omitempty" header:"-"`
	VersionIdMarker string       `url:"version-id-marker,omitempty" header:"-"`
	MaxKeys         int          `url:"max-keys,omitempty" header:"-"`
	XOptionHeader   *http.Header `url:"-" header:"-,omitempty" xml:"-"`
}

type BucketGetObjectVersionsResult added in v0.7.6

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" header:"-" xml:"-"`
	Delimiter     string       `url:"delimiter,omitempty" header:"-" xml:"-"`
	EncodingType  string       `url:"encoding-type,omitempty" header:"-" xml:"-"`
	Marker        string       `url:"marker,omitempty" header:"-" xml:"-"`
	MaxKeys       int          `url:"max-keys,omitempty" header:"-" xml:"-"`
	XOptionHeader *http.Header `header:"-,omitempty" url:"-" xml:"-"`
}

BucketGetOptions is the option of GetBucket

type BucketGetOriginResult added in v0.7.7

type BucketGetOriginResult BucketPutOriginOptions

type BucketGetPolicyResult

type BucketGetPolicyResult BucketPutPolicyOptions

type BucketGetRefererResult added in v0.7.4

type BucketGetRefererResult BucketPutRefererOptions

type BucketGetReplicationResult added in v0.7.55

type BucketGetReplicationResult = GetBucketReplicationResult

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 BucketHeadOptions added in v0.7.34

type BucketHeadOptions struct {
	XOptionHeader *http.Header `header:"-,omitempty" url:"-" xml:"-"`
}

type BucketIntelligentTieringFilter added in v0.7.55

type BucketIntelligentTieringFilter struct {
	And    *BucketIntelligentTieringFilterAnd `xml:"And,omitempty" header:"-"`
	Prefix string                             `xml:"Prefix,omitempty" header:"-"`
	Tag    []*BucketTaggingTag                `xml:"Tag,omitempty" header:"-"`
}

type BucketIntelligentTieringFilterAnd added in v0.7.55

type BucketIntelligentTieringFilterAnd struct {
	Prefix string              `xml:"Prefix,omitempty" header:"-"`
	Tag    []*BucketTaggingTag `xml:"Tag,omitempty" header:"-"`
}

type BucketIntelligentTieringTransition added in v0.7.9

type BucketIntelligentTieringTransition struct {
	AccessTier      string `xml:"AccessTier,omitempty" header:"-"`
	Days            int    `xml:"Days,omitempty" header:"-"`
	RequestFrequent int    `xml:"RequestFrequent,omitempty" header:"-"`
}

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:"And>Prefix,omitempty"`
	Tags         []ObjectTaggingTag           `xml:"And>Tag,omitempty"`
	StorageClass string                       `xml:"And>StorageClass,omitempty"`
	Period       *BucketInventoryFilterPeriod `xml:"Period,omitempty"`
}

BucketInventoryFilter ...

type BucketInventoryFilterPeriod added in v0.7.34

type BucketInventoryFilterPeriod struct {
	StartTime int64 `xml:"StartTime,omitempty"`
	EndTime   int64 `xml:"EndTime,omitempty"`
}

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" header:"-"`
}

BucketLifecycleAbortIncompleteMultipartUpload is the param of BucketLifecycleRule

type BucketLifecycleAndOperator added in v0.7.25

type BucketLifecycleAndOperator struct {
	Prefix                string             `xml:"Prefix,omitempty" header:"-"`
	Tag                   []BucketTaggingTag `xml:"Tag,omitempty" header:"-"`
	PrefixNotEquals       string             `xml:"PrefixNotEquals,omitempty" header:"-"`
	ObjectSizeGreaterThan int64              `xml:"ObjectSizeGreaterThan,omitempty" header:"-"`
	ObjectSizeLessThan    int64              `xml:"ObjectSizeLessThan,omitempty" header:"-"`
}

type BucketLifecycleExpiration

type BucketLifecycleExpiration struct {
	Date                      string `xml:"Date,omitempty" header:"-"`
	Days                      int    `xml:"Days,omitempty" header:"-"`
	ExpiredObjectDeleteMarker bool   `xml:"ExpiredObjectDeleteMarker,omitempty" header:"-"`
}

BucketLifecycleExpiration is the param of BucketLifecycleRule

type BucketLifecycleFilter

type BucketLifecycleFilter struct {
	Prefix string                      `xml:"Prefix,omitempty" header:"-"`
	Tag    *BucketTaggingTag           `xml:"Tag,omitempty" header:"-"`
	And    *BucketLifecycleAndOperator `xml:"And,omitempty" header:"-"`
}

BucketLifecycleFilter is the param of BucketLifecycleRule

type BucketLifecycleNoncurrentVersion added in v0.7.26

type BucketLifecycleNoncurrentVersion struct {
	NoncurrentDays  int                    `xml:"NoncurrentDays,omitempty" header:"-"`
	StorageClass    string                 `xml:"StorageClass,omitempty" header:"-"`
	AccessFrequency *BucketAccessFrequency `xml:"AccessFrequency,omitempty" header:"-"`
}

type BucketLifecycleRule

type BucketLifecycleRule struct {
	ID                             string                                         `xml:"ID,omitempty" header:"-"`
	Status                         string                                         `xml:"Status,omitempty" header:"-"`
	Filter                         *BucketLifecycleFilter                         `xml:"Filter,omitempty" header:"-"`
	Transition                     []BucketLifecycleTransition                    `xml:"Transition,omitempty" header:"-"`
	Expiration                     *BucketLifecycleExpiration                     `xml:"Expiration,omitempty" header:"-"`
	AbortIncompleteMultipartUpload *BucketLifecycleAbortIncompleteMultipartUpload `xml:"AbortIncompleteMultipartUpload,omitempty" header:"-"`
	NoncurrentVersionTransition    []BucketLifecycleNoncurrentVersion             `xml:"NoncurrentVersionTransition,omitempty" header:"-"`
	NoncurrentVersionExpiration    *BucketLifecycleNoncurrentVersion              `xml:"NoncurrentVersionExpiration,omitempty" header:"-"`
}

BucketLifecycleRule is the rule of BucketLifecycle

type BucketLifecycleTransition

type BucketLifecycleTransition struct {
	Date            string                 `xml:"Date,omitempty" header:"-"`
	Days            int                    `xml:"Days,omitempty" header:"-"`
	StorageClass    string                 `xml:"StorageClass,omitempty" header:"-"`
	AccessFrequency *BucketAccessFrequency `xml:"AccessFrequency,omitempty" header:"-"`
}

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 added in v0.7.7

type BucketOriginCondition struct {
	HTTPStatusCode string `xml:"HTTPStatusCode,omitempty"`
	Prefix         string `xml:"Prefix,omitempty"`
}

type BucketOriginFileInfo added in v0.7.7

type BucketOriginFileInfo struct {
	PrefixConfiguration    *OriginPrefixConfiguration    `xml:"PrefixConfiguration,omitempty"`
	SuffixConfiguration    *OriginSuffixConfiguration    `xml:"SuffixConfiguration,omitempty"`
	FixedFileConfiguration *OriginFixedFileConfiguration `xml:"FixedFileConfiguration,omitempty"`
}

type BucketOriginHostInfo added in v0.7.45

type BucketOriginHostInfo struct {
	HostName          string
	Weight            int64
	StandbyHostName_N []string
}

func (*BucketOriginHostInfo) MarshalXML added in v0.7.45

func (this *BucketOriginHostInfo) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (*BucketOriginHostInfo) UnmarshalXML added in v0.7.45

func (this *BucketOriginHostInfo) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type BucketOriginHttpHeader added in v0.7.7

type BucketOriginHttpHeader struct {
	// 目前还不支持 FollowAllHeaders
	FollowAllHeaders    bool               `xml:"FollowAllHeaders,omitempty"`
	NewHttpHeaders      []OriginHttpHeader `xml:"NewHttpHeaders>Header,omitempty"`
	FollowHttpHeaders   []OriginHttpHeader `xml:"FollowHttpHeaders>Header,omitempty"`
	ForbidFollowHeaders []OriginHttpHeader `xml:"ForbidFollowHeaders>Header,omitempty"`
}

type BucketOriginInfo added in v0.7.7

type BucketOriginInfo struct {
	HostInfo *BucketOriginHostInfo `xml:"HostInfo,omitempty"`
	FileInfo *BucketOriginFileInfo `xml:"FileInfo,omitempty"`
}

type BucketOriginParameter added in v0.7.7

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 added in v0.7.7

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 BucketPostInventoryOptions added in v0.7.42

type BucketPostInventoryOptions struct {
	XMLName                xml.Name                       `xml:"InventoryConfiguration"`
	ID                     string                         `xml:"Id"`
	IncludedObjectVersions string                         `xml:"IncludedObjectVersions"`
	Filter                 *BucketInventoryFilter         `xml:"Filter,omitempty"`
	OptionalFields         *BucketInventoryOptionalFields `xml:"OptionalFields,omitempty"`
	Destination            *BucketInventoryDestination    `xml:"Destination>COSBucketDestination"`
}

type BucketPutACLOptions

type BucketPutACLOptions struct {
	Header *ACLHeaderOptions `url:"-" xml:"-"`
	Body   *ACLXml           `url:"-" header:"-"`
}

BucketPutACLOptions is the option of PutBucketACL

type BucketPutAccelerateOptions added in v0.7.16

type BucketPutAccelerateOptions struct {
	XMLName xml.Name `xml:"AccelerateConfiguration"`
	Status  string   `xml:"Status,omitempty"`
	Type    string   `xml:"Type,omitempty"`
}

type BucketPutCORSOptions

type BucketPutCORSOptions struct {
	XMLName      xml.Name         `xml:"CORSConfiguration"`
	Rules        []BucketCORSRule `xml:"CORSRule,omitempty"`
	ResponseVary string           `xml:"ResponseVary,omitempty"`
}

BucketPutCORSOptions is the option of PutBucketCORS

type BucketPutDomainCertificateOptions added in v0.7.37

type BucketPutDomainCertificateOptions struct {
	XMLName         xml.Name                     `xml:"DomainCertificate"`
	CertificateInfo *BucketDomainCertificateInfo `xml:"CertificateInfo"`
	DomainList      []string                     `xml:"DomainList>DomainName"`
}

type BucketPutDomainOptions

type BucketPutDomainOptions struct {
	XMLName xml.Name           `xml:"DomainConfiguration"`
	Rules   []BucketDomainRule `xml:"DomainRule,omitempty"`
}

type BucketPutEncryptionOptions added in v0.7.4

type BucketPutEncryptionOptions struct {
	XMLName xml.Name                       `xml:"ServerSideEncryptionConfiguration"`
	Rule    *BucketEncryptionConfiguration `xml:"Rule>ApplyServerSideEncryptionByDefault"`
}

type BucketPutIntelligentTieringOptions added in v0.7.9

type BucketPutIntelligentTieringOptions struct {
	XMLName    xml.Name                            `xml:"IntelligentTieringConfiguration" header:"-"`
	Status     string                              `xml:"Status,omitempty" header:"-"`
	Transition *BucketIntelligentTieringTransition `xml:"Transition,omitempty" header:"-"`

	// V2
	Id      string                                `xml:"Id,omitempty" header:"-"`
	Tiering []*BucketIntelligentTieringTransition `xml:"Tiering,omitempty" header:"-"`
	Filter  *BucketIntelligentTieringFilter       `xml:"Filter,omitempty" header:"-"`

	XOptionHeader *http.Header `header:"-,omitempty" url:"-" xml:"-"`
}

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" header:"-"`
	Rules         []BucketLifecycleRule `xml:"Rule,omitempty" header:"-"`
	XOptionHeader *http.Header          `header:"-,omitempty" url:"-" xml:"-"`
}

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 BucketPutObjectLockOptions added in v0.7.42

type BucketPutObjectLockOptions struct {
	XMLName           xml.Name        `xml:"ObjectLockConfiguration"`
	ObjectLockEnabled string          `xml:"ObjectLockEnabled,omitempty"`
	Rule              *ObjectLockRule `xml:"Rule,omitempty"`
}

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:"-"`
	XCosTagging               string                     `header:"x-cos-tagging,omitempty" url:"-" xml:"-"`
	XOptionHeader             *http.Header               `header:"-,omitempty" url:"-" xml:"-"`
	CreateBucketConfiguration *CreateBucketConfiguration `header:"-" url:"-" xml:"-"`
}

BucketPutOptions is same to the ACLHeaderOptions

type BucketPutOriginOptions added in v0.7.7

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 added in v0.7.4

type BucketPutRefererOptions struct {
	XMLName                 xml.Name `xml:"RefererConfiguration"`
	Status                  string   `xml:"Status"`
	RefererType             string   `xml:"RefererType"`
	DomainList              []string `xml:"DomainList>Domain"`
	EmptyReferConfiguration string   `xml:"EmptyReferConfiguration,omitempty"`
	VerifySignatureURL      string   `xml:"VerifySignatureURL,omitempty"`
}

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"`
	AutoAddressing   *AutoAddressing           `xml:"AutoAddressing,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, opt ...*BucketDeleteOptions) (*Response, error)

Delete Bucket请求可以在指定账号下删除Bucket,删除之前要求Bucket为空。

https://www.qcloud.com/document/product/436/7732

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 跨域访问配置删除。

https://www.qcloud.com/document/product/436/8283

func (*BucketService) DeleteDomain added in v0.7.31

func (s *BucketService) DeleteDomain(ctx context.Context, opt ...*BucketDeleteDomainOptions) (*Response, error)

func (*BucketService) DeleteDomainCertificate added in v0.7.37

func (s *BucketService) DeleteDomainCertificate(ctx context.Context, opt *BucketDeleteDomainCertificateOptions) (*Response, error)

func (*BucketService) DeleteEncryption added in v0.7.4

func (s *BucketService) DeleteEncryption(ctx context.Context) (*Response, error)

func (*BucketService) DeleteIntelligentTiering added in v0.7.55

func (s *BucketService) DeleteIntelligentTiering(ctx context.Context, id string) (*Response, error)

func (*BucketService) DeleteInventory

func (s *BucketService) DeleteInventory(ctx context.Context, id string) (*Response, error)

DeleteBucketInventory https://cloud.tencent.com/document/product/436/33704

func (*BucketService) DeleteLifecycle

func (s *BucketService) DeleteLifecycle(ctx context.Context, opt ...*BucketDeleteLifecycleOptions) (*Response, error)

DeleteLifecycle 请求实现删除生命周期管理。 https://www.qcloud.com/document/product/436/8284

func (*BucketService) DeleteOrigin added in v0.7.7

func (s *BucketService) DeleteOrigin(ctx context.Context) (*Response, error)

func (*BucketService) DeletePolicy

func (s *BucketService) DeletePolicy(ctx context.Context) (*Response, error)

func (*BucketService) DeleteReferer added in v0.7.55

func (s *BucketService) DeleteReferer(ctx context.Context) (*Response, error)

Put空

func (*BucketService) DeleteTagging

func (s *BucketService) DeleteTagging(ctx context.Context) (*Response, error)

DeleteTagging 接口实现删除指定Bucket的标签。

https://www.qcloud.com/document/product/436/8286

func (*BucketService) DeleteWebsite

func (s *BucketService) DeleteWebsite(ctx context.Context) (*Response, error)

func (*BucketService) Get

Get Bucket请求等同于 List Object请求,可以列出该Bucket下部分或者所有Object,发起该请求需要拥有Read权限。

https://www.qcloud.com/document/product/436/7734

func (*BucketService) GetACL

GetACL 使用API读取Bucket的ACL表,只有所有者有权操作。

https://www.qcloud.com/document/product/436/7733

func (*BucketService) GetAccelerate added in v0.7.16

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

GetCORS 实现 Bucket 跨域访问配置读取。

https://www.qcloud.com/document/product/436/8274

func (*BucketService) GetDomain

func (*BucketService) GetDomainCertificate added in v0.7.37

func (*BucketService) GetEncryption added in v0.7.4

func (*BucketService) GetIntelligentTiering added in v0.7.9

func (*BucketService) GetIntelligentTieringV2 added in v0.7.55

func (*BucketService) GetLifecycle

GetLifecycle 请求实现读取生命周期管理的配置。当配置不存在时,返回404 Not Found。 https://www.qcloud.com/document/product/436/8278

func (*BucketService) GetLocation

GetLocation 接口获取Bucket所在地域信息,只有Bucket所有者有权限读取信息。

https://www.qcloud.com/document/product/436/8275

func (*BucketService) GetMeta added in v0.7.55

func (s *BucketService) GetMeta(ctx context.Context, bucket ...string) (*BucketGetMetadataResult, *Response, error)

func (*BucketService) GetObjectLockConfiguration added in v0.7.42

func (s *BucketService) GetObjectLockConfiguration(ctx context.Context) (*BucketGetObjectLockResult, *Response, error)

func (*BucketService) GetObjectVersions added in v0.7.6

func (*BucketService) GetOrigin added in v0.7.7

func (*BucketService) GetPolicy

func (*BucketService) GetReferer added in v0.7.4

func (*BucketService) GetTagging

GetTagging 接口实现获取指定Bucket的标签。

https://www.qcloud.com/document/product/436/8277

func (*BucketService) GetWebsite

func (*BucketService) Head

func (s *BucketService) Head(ctx context.Context, opt ...*BucketHeadOptions) (*Response, error)

Head Bucket请求可以确认是否存在该Bucket,是否有权限访问,Head的权限与Read一致。

当其存在时,返回 HTTP 状态码200;
当无权限时,返回 HTTP 状态码403;
当不存在时,返回 HTTP 状态码404。

https://www.qcloud.com/document/product/436/7735

func (*BucketService) IsExist added in v0.7.33

func (s *BucketService) IsExist(ctx context.Context) (bool, error)

func (*BucketService) ListIntelligentTiering added in v0.7.55

func (s *BucketService) ListIntelligentTiering(ctx context.Context) (*ListIntelligentTieringConfigurations, *Response, error)

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

ListMultipartUploads 用来查询正在进行中的分块上传。单次最多列出1000个正在进行中的分块上传。

https://www.qcloud.com/document/product/436/7736

func (*BucketService) PostInventory added in v0.7.42

func (s *BucketService) PostInventory(ctx context.Context, id string, opt *BucketPostInventoryOptions) (*Response, error)

func (*BucketService) Put

Put Bucket请求可以在指定账号下创建一个Bucket。

https://www.qcloud.com/document/product/436/7738

func (*BucketService) PutACL

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的读写权限

https://www.qcloud.com/document/product/436/7737

func (*BucketService) PutAccelerate added in v0.7.16

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。

https://www.qcloud.com/document/product/436/8279

func (*BucketService) PutDomain

func (s *BucketService) PutDomain(ctx context.Context, opt *BucketPutDomainOptions) (*Response, error)

func (*BucketService) PutDomainCertificate added in v0.7.37

func (s *BucketService) PutDomainCertificate(ctx context.Context, opt *BucketPutDomainCertificateOptions) (*Response, error)

func (*BucketService) PutEncryption added in v0.7.4

func (s *BucketService) PutEncryption(ctx context.Context, opt *BucketPutEncryptionOptions) (*Response, error)

func (*BucketService) PutIntelligentTiering added in v0.7.9

func (s *BucketService) PutIntelligentTiering(ctx context.Context, opt *BucketPutIntelligentTieringOptions) (*Response, error)

func (*BucketService) PutIntelligentTieringV2 added in v0.7.55

func (s *BucketService) PutIntelligentTieringV2(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) PutObjectLockConfiguration added in v0.7.42

func (s *BucketService) PutObjectLockConfiguration(ctx context.Context, opt *BucketPutObjectLockOptions) (*Response, error)

func (*BucketService) PutOrigin added in v0.7.7

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 added in v0.7.4

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。

https://www.qcloud.com/document/product/436/8281

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 BucketStatement struct {
	Principal map[string][]string               `json:"principal,omitempty"`
	Action    []string                          `json:"action,omitempty"`
	Effect    string                            `json:"effect,omitempty"`
	Resource  []string                          `json:"resource,omitempty"`
	Condition map[string]map[string]interface{} `json:"condition,omitempty"`
	Sid       string                            `json:"sid,omitempty"`
}

type BucketTaggingTag

type BucketTaggingTag struct {
	Key   string
	Value string
}

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 CIDocCompareOptions added in v0.7.46

type CIDocCompareOptions struct {
	Object      string `url:"object,omitempty"`
	ComparePath string `url:"comparePath,omitempty"`
	CompareUrl  string `url:"compareUrl,omitempty"`
	SrcType     string `url:"srcType,omitempty"`
	TgtUri      string `url:"tgtUri,omitempty"`
}

type CIDocCompareResult added in v0.7.46

type CIDocCompareResult struct {
	XMLName    xml.Name `xml:"Response"`
	Code       string   `xml:"Code,omitempty" json:"code,omitempty"`
	ETag       string   `xml:"ETag,omitempty" json:"eTag,omitempty"`
	Msg        string   `xml:"Msg,omitempty" json:"msg,omitempty"`
	ResultPath string   `xml:"ResultPath,omitempty" json:"resultPath,omitempty"`
}

func (*CIDocCompareResult) Write added in v0.7.46

func (w *CIDocCompareResult) Write(p []byte) (n int, err error)

优先 json

type CIService added in v0.7.11

type CIService service

func (*CIService) AIBodyRecognition added in v0.7.42

人体识别 https://cloud.tencent.com/document/product/436/83728

func (*CIService) AIGameRec added in v0.7.46

func (s *CIService) AIGameRec(ctx context.Context, obj string, opt *AIGameRecOptions) (*AIGameRecResult, *Response, error)

func (*CIService) AILicenseRec added in v0.7.44

func (s *CIService) AILicenseRec(ctx context.Context, obj string, opt *AILicenseRecOptions) (*AILicenseRecResult, *Response, error)

func (*CIService) AIObjectDetect added in v0.7.44

func (s *CIService) AIObjectDetect(ctx context.Context, obj string, opt *AIObjectDetectOptions) (*AIObjectDetectResult, *Response, error)

func (*CIService) AIPicMatting added in v0.7.53

func (s *CIService) AIPicMatting(ctx context.Context, ObjectKey string, opt *AIPicMattingOptions) (*Response, error)

通用抠图 https://cloud.tencent.com/document/product/460/106750

func (*CIService) AIPortraitMatting added in v0.7.53

func (s *CIService) AIPortraitMatting(ctx context.Context, ObjectKey string, opt *AIPortraitMattingOptions) (*Response, error)

人像抠图 https://cloud.tencent.com/document/product/460/106751

func (*CIService) AIRecognition added in v0.7.55

func (s *CIService) AIRecognition(ctx context.Context, ObjectKey string, opt *AIRecognitionOptions) (*AIRecognitionResult, *Response, error)

多AI接口合一

func (*CIService) ActiveMediaWorkflow added in v0.7.40

func (s *CIService) ActiveMediaWorkflow(ctx context.Context, workflowId string) (*Response, error)

UpdateMediaWorkflow TODO

func (*CIService) AddImage added in v0.7.42

func (s *CIService) AddImage(ctx context.Context, name string, opt *AddImageOptions) (*Response, error)

AddImage 添加图库图片

func (*CIService) AddStyle added in v0.7.36

func (s *CIService) AddStyle(ctx context.Context, opt *AddStyleOptions) (*Response, error)

func (*CIService) BatchImageAuditing added in v0.7.33

图片批量审核接口

func (*CIService) CIDocCompare added in v0.7.46

DocCompare TODO

func (*CIService) CancelInventoryTriggerJob added in v0.7.35

func (s *CIService) CancelInventoryTriggerJob(ctx context.Context, jobId string) (*Response, error)

CancelInventoryTriggerJob TODO

func (*CIService) CancelJob added in v0.7.42

func (s *CIService) CancelJob(ctx context.Context, jobId string) (*Response, error)

CreateJobsOptions 提交任务的公用方法

func (*CIService) CloseCIService added in v0.7.36

func (s *CIService) CloseCIService(ctx context.Context) (*Response, error)

func (*CIService) CloseOriginProtect added in v0.7.36

func (s *CIService) CloseOriginProtect(ctx context.Context) (*Response, error)

func (*CIService) CosImageInspect added in v0.7.44

ImageInspect 黑产检查同步接口

func (*CIService) CreateAIJobs added in v0.7.39

CreateAIJobs TODO

func (*CIService) CreateASRJobs added in v0.7.34

CreateASRJobs TODO

func (*CIService) CreateDocProcessJobs added in v0.7.13

创建文档预览任务 https://cloud.tencent.com/document/product/436/54056

func (*CIService) CreateFileProcessJob added in v0.7.41

func (s *CIService) CreateFileProcessJob(ctx context.Context, opt *FileProcessJobOptions) (*FileProcessJobResult, *Response, error)

提交哈希值计算任务 https://cloud.tencent.com/document/product/436/83108 提交文件解压任务 https://cloud.tencent.com/document/product/436/83110 提交多文件打包压缩任务 https://cloud.tencent.com/document/product/436/83112

func (*CIService) CreateGeneratePlayListJob added in v0.7.48

func (s *CIService) CreateGeneratePlayListJob(ctx context.Context, opt *CreateGeneratePlayListJobOptions) (*CreateJobsResult, *Response, error)

func (*CIService) CreateImageSearchBucket added in v0.7.42

func (s *CIService) CreateImageSearchBucket(ctx context.Context, opt *CreateImageSearchBucketOptions) (*Response, error)

CreateImageSearchBucket 开通以图搜图

func (*CIService) CreateInventoryTriggerJob added in v0.7.35

CreateInventoryTriggerJob TODO

func (*CIService) CreateJob added in v0.7.42

CreateJobsOptions 提交任务的公用方法

func (*CIService) CreateMediaAnimationTemplate added in v0.7.35

func (s *CIService) CreateMediaAnimationTemplate(ctx context.Context, opt *CreateMediaAnimationTemplateOptions) (*CreateMediaTemplateResult, *Response, error)

CreateMediaAnimationTemplate 创建动图模板

func (*CIService) CreateMediaConcatTemplate added in v0.7.35

CreateMediaConcatTemplate 创建拼接模板

func (*CIService) CreateMediaJobs added in v0.7.21

CreateMediaJobs TODO

func (*CIService) CreateMediaPicProcessTemplate added in v0.7.35

func (s *CIService) CreateMediaPicProcessTemplate(ctx context.Context, opt *CreateMediaPicProcessTemplateOptions) (*CreateMediaTemplateResult, *Response, error)

CreateMediaPicProcessTemplate 创建图片处理模板

func (*CIService) CreateMediaPlayKey added in v0.7.48

func (s *CIService) CreateMediaPlayKey(ctx context.Context) (*PlayKeyResult, *Response, error)

func (*CIService) CreateMediaProcessBucket added in v0.7.48

func (*CIService) CreateMediaSmartCoverTemplate added in v0.7.39

func (s *CIService) CreateMediaSmartCoverTemplate(ctx context.Context, opt *CreateMediaSmartCoverTemplateOptions) (*CreateMediaTemplateResult, *Response, error)

CreateMediaTtsTemplate 创建智能封面模板

func (*CIService) CreateMediaSnapshotTemplate added in v0.7.35

CreateMediaSnapshotTemplate 创建截图模板

func (*CIService) CreateMediaSpeechRecognitionTemplate added in v0.7.39

func (s *CIService) CreateMediaSpeechRecognitionTemplate(ctx context.Context, opt *CreateMediaSpeechRecognitionTemplateOptions) (*CreateMediaTemplateResult, *Response, error)

CreateMediaTtsTemplate 创建语音识别模板

func (*CIService) CreateMediaSuperResolutionTemplate added in v0.7.35

func (s *CIService) CreateMediaSuperResolutionTemplate(ctx context.Context, opt *CreateMediaSuperResolutionTemplateOptions) (*CreateMediaTemplateResult, *Response, error)

CreateMediaSuperResolutionTemplate 创建超级分辨率模板

func (*CIService) CreateMediaTranscodeProTemplate added in v0.7.39

func (s *CIService) CreateMediaTranscodeProTemplate(ctx context.Context, opt *CreateMediaTranscodeProTemplateOptions) (*CreateMediaTemplateResult, *Response, error)

CreateMediaTranscodeProTemplate 创建广电转码模板

func (*CIService) CreateMediaTranscodeTemplate added in v0.7.35

func (s *CIService) CreateMediaTranscodeTemplate(ctx context.Context, opt *CreateMediaTranscodeTemplateOptions) (*CreateMediaTemplateResult, *Response, error)

CreateMediaTranscodeTemplate Options 创建转码模板

func (*CIService) CreateMediaTtsTemplate added in v0.7.39

CreateMediaTtsTemplate 创建语音合成模板

func (*CIService) CreateMediaVideoMontageTemplate added in v0.7.35

func (s *CIService) CreateMediaVideoMontageTemplate(ctx context.Context, opt *CreateMediaVideoMontageTemplateOptions) (*CreateMediaTemplateResult, *Response, error)

CreateMediaVideoMontageTemplate 创建精彩集锦模板

func (*CIService) CreateMediaVideoProcessTemplate added in v0.7.35

func (s *CIService) CreateMediaVideoProcessTemplate(ctx context.Context, opt *CreateMediaVideoProcessTemplateOptions) (*CreateMediaTemplateResult, *Response, error)

CreateMediaVideoProcessTemplate 创建视频增强模板

func (*CIService) CreateMediaVoiceSeparateTemplate added in v0.7.35

func (s *CIService) CreateMediaVoiceSeparateTemplate(ctx context.Context, opt *CreateMediaVoiceSeparateTemplateOptions) (*CreateMediaTemplateResult, *Response, error)

CreateMediaVoiceSeparateTemplate 创建人声分离模板

func (*CIService) CreateMediaWatermarkTemplate added in v0.7.35

func (s *CIService) CreateMediaWatermarkTemplate(ctx context.Context, opt *CreateMediaWatermarkTemplateOptions) (*CreateMediaTemplateResult, *Response, error)

CreateMediaWatermarkTemplate 创建水印模板

func (*CIService) CreateMediaWorkflow added in v0.7.35

CreateMediaWorkflow 创建工作流

func (*CIService) CreateMultiGeneratePlayListJobs added in v0.7.56

func (s *CIService) CreateMultiGeneratePlayListJobs(ctx context.Context, opt *CreateMultiGeneratePlayListJobsOptions) (*CreateMultiMediaJobsResult, *Response, error)

CreateMultiGeneratePlayListJobs TODO

func (*CIService) CreateMultiMediaJobs added in v0.7.32

CreateMultiMediaJobs TODO

func (*CIService) CreateNoiseReductionTemplate added in v0.7.42

func (s *CIService) CreateNoiseReductionTemplate(ctx context.Context, opt *CreateNoiseReductionTemplateOptions) (*CreateMediaTemplateResult, *Response, error)

CreateNoiseReductionTemplate 创建音频降噪模板

func (*CIService) CreateOCRTemplate added in v0.7.46

CreateOCRTemplate 创建OCR模板

func (*CIService) CreatePicProcessJobs added in v0.7.35

func (s *CIService) CreatePicProcessJobs(ctx context.Context, opt *CreatePicJobsOptions) (*CreatePicJobsResult, *Response, error)

CreatePicProcessJobs TODO

func (*CIService) CreatePlayKey added in v0.7.46

func (s *CIService) CreatePlayKey(ctx context.Context) (*PlayKeyResult, *Response, error)

func (*CIService) CreateVideoEnhanceTemplate added in v0.7.42

CreateVideoEnhanceTemplate 创建画质增强模板

func (*CIService) CreateVideoTargetRecTemplate added in v0.7.42

func (s *CIService) CreateVideoTargetRecTemplate(ctx context.Context, opt *CreateVideoTargetRecTemplateOptions) (*CreateMediaTemplateResult, *Response, error)

CreateVideoTargetRecTemplate 创建移动物体检测模板

func (*CIService) DelImage added in v0.7.42

func (s *CIService) DelImage(ctx context.Context, name string, opt *DelImageOptions) (*Response, error)

DelImage 删除图库图片

func (*CIService) DeleteGuetzli added in v0.7.25

func (s *CIService) DeleteGuetzli(ctx context.Context) (*Response, error)

关闭 Guetzli 压缩 https://cloud.tencent.com/document/product/460/30113

func (*CIService) DeleteImageSlim added in v0.7.55

func (s *CIService) DeleteImageSlim(ctx context.Context) (*Response, error)

关闭 极智压缩ImageSlim https://cloud.tencent.com/document/product/460/95044

func (*CIService) DeleteMediaTemplate added in v0.7.35

func (s *CIService) DeleteMediaTemplate(ctx context.Context, tempalteId string) (*DeleteMediaTemplateResult, *Response, error)

DeleteMediaTemplate TODO

func (*CIService) DeleteMediaWorkflow added in v0.7.35

func (s *CIService) DeleteMediaWorkflow(ctx context.Context, workflowId string) (*DeleteMediaWorkflowResult, *Response, error)

DeleteMediaWorkflow 删除工作流

func (*CIService) DeleteStyle added in v0.7.36

func (s *CIService) DeleteStyle(ctx context.Context, opt *DeleteStyleOptions) (*Response, error)

func (*CIService) DeleteTemplate added in v0.7.42

func (s *CIService) DeleteTemplate(ctx context.Context, tempalteId string) (*DeleteTemplateResult, *Response, error)

DeleteTemplate 删除模板的公用方法

func (*CIService) DescribeAIJob added in v0.7.39

func (s *CIService) DescribeAIJob(ctx context.Context, jobid string) (*DescribeAIJobResult, *Response, error)

DescribeAIJob TODO

func (*CIService) DescribeAIProcessBuckets added in v0.7.39

DescribeAIProcessBuckets TODO

func (*CIService) DescribeAIProcessQueues added in v0.7.39

DescribeAIProcessQueues TODO

func (*CIService) DescribeASRProcessBuckets added in v0.7.39

DescribeASRProcessBuckets TODO

func (*CIService) DescribeASRProcessQueues added in v0.7.39

DescribeASRQueues TODO

func (*CIService) DescribeDocProcessBuckets added in v0.7.13

查询文档预览开通状态 https://cloud.tencent.com/document/product/436/54057

func (*CIService) DescribeDocProcessJob added in v0.7.13

func (s *CIService) DescribeDocProcessJob(ctx context.Context, jobid string) (*DescribeDocProcessJobResult, *Response, error)

查询文档预览任务 https://cloud.tencent.com/document/product/436/54095

func (*CIService) DescribeDocProcessJobs added in v0.7.13

拉取符合条件的文档预览任务 https://cloud.tencent.com/document/product/436/54096

func (*CIService) DescribeDocProcessQueues added in v0.7.13

查询文档预览队列 https://cloud.tencent.com/document/product/436/54055

func (*CIService) DescribeFileProcessBuckets added in v0.7.42

DescribeFileProcessBuckets TODO

func (*CIService) DescribeFileProcessJob added in v0.7.41

func (s *CIService) DescribeFileProcessJob(ctx context.Context, jobid string) (*FileProcessJobResult, *Response, error)

查询哈希值计算结果 https://cloud.tencent.com/document/product/436/83109 查询文件解压结果 https://cloud.tencent.com/document/product/436/83111 查询多文件打包压缩结果 https://cloud.tencent.com/document/product/436/83113

func (*CIService) DescribeFileProcessQueues added in v0.7.44

DescribeFileProcessQueues TODO

func (*CIService) DescribeInventoryTriggerJob added in v0.7.35

func (s *CIService) DescribeInventoryTriggerJob(ctx context.Context, jobId string) (*DescribeInventoryTriggerJobResult, *Response, error)

DescribeInventoryTriggerJob 查询指定存量触发工作流的任务

func (*CIService) DescribeInventoryTriggerJobs added in v0.7.35

DescribeInventoryTriggerJobs 查询存量触发工作流的任务

func (*CIService) DescribeJob added in v0.7.42

func (s *CIService) DescribeJob(ctx context.Context, jobid string) (*DescribeJobsResult, *Response, error)

DescribeJobs 查询指定任务的公用方法

func (*CIService) DescribeJobs added in v0.7.42

DescribeJobs 查询任务列表的公用方法

func (*CIService) DescribeMediaJob added in v0.7.26

func (s *CIService) DescribeMediaJob(ctx context.Context, jobid string) (*DescribeMediaProcessJobResult, *Response, error)

DescribeMediaJob TODO

func (*CIService) DescribeMediaJobs added in v0.7.21

DescribeMediaJobs TODO https://cloud.tencent.com/document/product/460/48235

func (*CIService) DescribeMediaPlayKey added in v0.7.48

func (s *CIService) DescribeMediaPlayKey(ctx context.Context) (*PlayKeyResult, *Response, error)

func (*CIService) DescribeMediaProcessBuckets added in v0.7.21

DescribeMediaProcessBuckets TODO 媒体bucket接口 https://cloud.tencent.com/document/product/436/48988

func (*CIService) DescribeMediaProcessQueues added in v0.7.21

DescribeMediaProcessQueues TODO

func (*CIService) DescribeMediaTemplate added in v0.7.35

DescribeMediaTemplate 搜索模板

func (*CIService) DescribeMediaWorkflow added in v0.7.35

DescribeMediaWorkflow 搜索工作流

func (*CIService) DescribeMultiASRJob added in v0.7.34

func (s *CIService) DescribeMultiASRJob(ctx context.Context, jobids []string) (*DescribeMutilASRJobResult, *Response, error)

DescribeMultiASRJob TODO

func (*CIService) DescribeMultiMediaJob added in v0.7.34

func (s *CIService) DescribeMultiMediaJob(ctx context.Context, jobids []string) (*DescribeMutilMediaProcessJobResult, *Response, error)

DescribeMultiMediaJob TODO

func (*CIService) DescribePicProcessBuckets added in v0.7.39

DescribePicProcessBuckets TODO

func (*CIService) DescribePicProcessJob added in v0.7.35

func (s *CIService) DescribePicProcessJob(ctx context.Context, jobid string) (*DescribePicProcessJobResult, *Response, error)

DescribePicProcessJob TODO

func (*CIService) DescribePicProcessQueues added in v0.7.35

DescribePicProcessQueues TODO

func (*CIService) DescribeTemplate added in v0.7.42

DescribeTemplate 搜索模板的公用方法

func (*CIService) DescribeWorkflowExecution added in v0.7.34

func (s *CIService) DescribeWorkflowExecution(ctx context.Context, runId string) (*DescribeWorkflowExecutionResult, *Response, error)

DescribeWorkflowExecution TODO 获取工作流实例详情 https://cloud.tencent.com/document/product/460/45949

func (*CIService) DescribeWorkflowExecutions added in v0.7.34

DescribeWorkflowExecutions TODO 获取工作流实例列表 https://cloud.tencent.com/document/product/460/80050

func (*CIService) DetectCar added in v0.7.36

func (s *CIService) DetectCar(ctx context.Context, obj string) (*DetectCarResult, *Response, error)

DetectCar 车辆车牌检测

func (*CIService) DetectFace added in v0.7.36

func (s *CIService) DetectFace(ctx context.Context, obj string, opt *DetectFaceOptions) (*DetectFaceResult, *Response, error)

func (*CIService) DetectPet added in v0.7.46

func (s *CIService) DetectPet(ctx context.Context, obj string, opt *PetDetectOption) (*PetDetectResult, *Response, error)

func (*CIService) DocPreview added in v0.7.13

func (s *CIService) DocPreview(ctx context.Context, name string, opt *DocPreviewOptions) (*Response, error)

同步请求接口 https://cloud.tencent.com/document/product/436/54058

func (*CIService) DocPreviewHTML added in v0.7.37

func (s *CIService) DocPreviewHTML(ctx context.Context, name string, opt *DocPreviewHTMLOptions) (*Response, error)

文档转html https://cloud.tencent.com/document/product/460/52518

func (*CIService) EffectPet added in v0.7.44

func (s *CIService) EffectPet(ctx context.Context, obj string) (*PetEffectResult, *Response, error)

func (*CIService) FaceEffect added in v0.7.36

func (s *CIService) FaceEffect(ctx context.Context, obj string, opt *FaceEffectOptions) (*FaceEffectResult, *Response, error)

func (*CIService) GenerateAVInfo added in v0.7.48

func (s *CIService) GenerateAVInfo(ctx context.Context, opt *GenerateAVInfoOptions) (*GetAVInfoResult, *Response, error)

GenerateMediaInfo TODO 生成媒体信息接口,支持大文件,耗时较大请求

func (*CIService) GenerateMediaInfo added in v0.7.34

func (s *CIService) GenerateMediaInfo(ctx context.Context, opt *GenerateMediaInfoOptions) (*GetMediaInfoResult, *Response, error)

GenerateMediaInfo TODO 生成媒体信息接口,支持大文件,耗时较大请求

func (*CIService) GenerateQRcode added in v0.7.25

二维码生成 https://cloud.tencent.com/document/product/436/54071

func (*CIService) GenerateQRcodeToFile added in v0.7.25

func (s *CIService) GenerateQRcodeToFile(ctx context.Context, filePath string, opt *GenerateQRcodeOptions) (*GenerateQRcodeResult, *Response, error)

func (*CIService) Get added in v0.7.25

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) GetAIEnhanceImage added in v0.7.42

func (s *CIService) GetAIEnhanceImage(ctx context.Context, name string) (*Response, error)

GetAIEnhanceImage https://cloud.tencent.com/document/product/460/83792

func (*CIService) GetAIEnhanceImageV2 added in v0.7.46

func (s *CIService) GetAIEnhanceImageV2(ctx context.Context, name string, opt *AIEnhanceImageOptions) (*Response, error)

GetAIEnhanceImage https://cloud.tencent.com/document/product/460/83792

func (*CIService) GetAIImageColoring added in v0.7.42

func (s *CIService) GetAIImageColoring(ctx context.Context, name string) (*Response, error)

GetAIImageColoring https://https://cloud.tencent.com/document/product/460/83794

func (*CIService) GetAIImageColoringV2 added in v0.7.46

func (s *CIService) GetAIImageColoringV2(ctx context.Context, name string, opt *AIImageColoringOptions) (*Response, error)

func (*CIService) GetAIImageCrop added in v0.7.42

func (s *CIService) GetAIImageCrop(ctx context.Context, name string, opt *AIImageCropOptions) (*Response, error)

GetAIImageCrop https://cloud.tencent.com/document/product/460/83791

func (*CIService) GetAISuperResolution added in v0.7.42

func (s *CIService) GetAISuperResolution(ctx context.Context, name string) (*Response, error)

GetAISuperResolution https://cloud.tencent.com/document/product/460/83793

func (*CIService) GetAISuperResolutionV2 added in v0.7.46

func (s *CIService) GetAISuperResolutionV2(ctx context.Context, name string, opt *AISuperResolutionOptions) (*Response, error)

GetAISuperResolution https://cloud.tencent.com/document/product/460/83793

func (*CIService) GetActionSequence added in v0.7.36

func (s *CIService) GetActionSequence(ctx context.Context) (*GetActionSequenceResult, *Response, error)

func (*CIService) GetAssessQuality added in v0.7.42

func (s *CIService) GetAssessQuality(ctx context.Context, name string) (*AssessQualityResults, *Response, error)

GetAssessQuality https://cloud.tencent.com/document/product/460/63228

func (*CIService) GetAudioAuditingJob added in v0.7.25

func (s *CIService) GetAudioAuditingJob(ctx context.Context, jobid string) (*GetAudioAuditingJobResult, *Response, error)

音频审核-查询任务 https://cloud.tencent.com/document/product/460/53396

func (*CIService) GetAutoTranslationBlock added in v0.7.42

GetAIImageCrop https://cloud.tencent.com/document/product/460/83547

func (*CIService) GetCIService added in v0.7.36

func (s *CIService) GetCIService(ctx context.Context) (*CIServiceResult, *Response, error)

func (*CIService) GetDnaDb added in v0.7.43

func (s *CIService) GetDnaDb(ctx context.Context, opt *GetDnaDbOptions) (*GetDnaDbResult, *Response, error)

GetDnaDb 查询 DNA 库列表

func (*CIService) GetDnaDbFiles added in v0.7.43

GetDnaDb 查询 DNA 库列表

func (*CIService) GetDocumentAuditingJob added in v0.7.31

func (s *CIService) GetDocumentAuditingJob(ctx context.Context, jobid string) (*GetDocumentAuditingJobResult, *Response, error)

文档审核-查询任务 https://cloud.tencent.com/document/product/436/59382

func (*CIService) GetFileHash added in v0.7.41

func (s *CIService) GetFileHash(ctx context.Context, name string, opt *GetFileHashOptions) (*GetFileHashResult, *Response, error)

哈希值计算同步请求 https://cloud.tencent.com/document/product/436/83107

func (*CIService) GetGuetzli added in v0.7.25

func (s *CIService) GetGuetzli(ctx context.Context) (*GetGuetzliResult, *Response, error)

查询 Guetzli 状态 https://cloud.tencent.com/document/product/460/30111

func (s *CIService) GetHotLink(ctx context.Context) (*HotLinkResult, *Response, error)

func (*CIService) GetImageAuditingJob added in v0.7.34

func (s *CIService) GetImageAuditingJob(ctx context.Context, jobid string) (*GetImageAuditingJobResult, *Response, error)

图片审核-查询任务

func (*CIService) GetImageRepair added in v0.7.42

func (s *CIService) GetImageRepair(ctx context.Context, name string, opt *ImageRepairOptions) (*Response, error)

GetImageRepair https://cloud.tencent.com/document/product/460/79042

func (*CIService) GetImageSlim added in v0.7.55

func (s *CIService) GetImageSlim(ctx context.Context) (*ImageSlimResult, *Response, error)

查询 极智压缩ImageSlim https://cloud.tencent.com/document/product/460/95043

func (*CIService) GetLiveCode added in v0.7.36

func (s *CIService) GetLiveCode(ctx context.Context) (*GetLiveCodeResult, *Response, error)

func (*CIService) GetMediaInfo added in v0.7.32

func (s *CIService) GetMediaInfo(ctx context.Context, name string, opt *ObjectGetOptions, id ...string) (*GetMediaInfoResult, *Response, error)

GetMediaInfo TODO 媒体信息接口 https://cloud.tencent.com/document/product/436/55672

func (*CIService) GetOriginImage added in v0.7.42

func (s *CIService) GetOriginImage(ctx context.Context, name string) (*Response, error)

GetOriginImage https://cloud.tencent.com/document/product/460/90744

func (*CIService) GetOriginProtect added in v0.7.36

func (s *CIService) GetOriginProtect(ctx context.Context) (*OriginProtectResult, *Response, error)

func (*CIService) GetPlayKey added in v0.7.46

func (s *CIService) GetPlayKey(ctx context.Context) (*PlayKeyResult, *Response, error)

func (*CIService) GetPosterproductionTemplate added in v0.7.42

func (s *CIService) GetPosterproductionTemplate(ctx context.Context, tplId string) (*PosterproductionTemplateResult, *Response, error)

func (*CIService) GetPosterproductionTemplates added in v0.7.42

func (*CIService) GetPrivateM3U8 added in v0.7.34

func (s *CIService) GetPrivateM3U8(ctx context.Context, name string, opt *GetPrivateM3U8Options, id ...string) (*Response, error)

GetPrivateM3U8 TODO 获取私有m3u8资源接口 https://cloud.tencent.com/document/product/460/63738

func (*CIService) GetQRcode added in v0.7.25

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) GetQRcodeV2 added in v0.7.46

func (s *CIService) GetQRcodeV2(ctx context.Context, name string, cover int, opt *ObjectGetOptions, id ...string) (*GetQRcodeResultV2, *Response, error)

二维码识别-下载时识别 https://cloud.tencent.com/document/product/436/54070

func (s *CIService) GetRecognizeLogo(ctx context.Context, name string, opt *RecognizeLogoOptions) (*RecognizeLogoResults, *Response, error)

GetRecognizeLogo https://cloud.tencent.com/document/product/460/79736

func (*CIService) GetSnapshot added in v0.7.32

func (s *CIService) GetSnapshot(ctx context.Context, name string, opt *GetSnapshotOptions, id ...string) (*Response, error)

GetSnapshot TODO 媒体截图接口 https://cloud.tencent.com/document/product/436/55671

func (*CIService) GetStyle added in v0.7.36

func (s *CIService) GetStyle(ctx context.Context, opt *GetStyleOptions) (*GetStyleResult, *Response, error)

func (*CIService) GetTextAuditingJob added in v0.7.31

func (s *CIService) GetTextAuditingJob(ctx context.Context, jobid string) (*GetTextAuditingJobResult, *Response, error)

文本审核-查询任务 https://cloud.tencent.com/document/product/436/56288

func (*CIService) GetToFile added in v0.7.25

func (s *CIService) GetToFile(ctx context.Context, name, localpath, operation string, opt *ObjectGetOptions, id ...string) (*Response, error)

func (*CIService) GetVideoAuditingJob added in v0.7.11

func (s *CIService) GetVideoAuditingJob(ctx context.Context, jobid string) (*GetVideoAuditingJobResult, *Response, error)

视频审核-查询任务 https://cloud.tencent.com/document/product/460/46926

func (*CIService) GetVirusDetectJob added in v0.7.34

func (s *CIService) GetVirusDetectJob(ctx context.Context, jobid string) (*GetVirusDetectJobResult, *Response, error)

云查毒接口-查询病毒检测任务结果 https://cloud.tencent.com/document/product/436/63962

func (*CIService) GetWebpageAuditingJob added in v0.7.33

func (s *CIService) GetWebpageAuditingJob(ctx context.Context, jobid string) (*GetWebpageAuditingJobResult, *Response, error)

网页审核-查询任务 https://cloud.tencent.com/document/product/436/63959

func (*CIService) GoodsMatting added in v0.7.37

func (s *CIService) GoodsMatting(ctx context.Context, key string) (*Response, error)

GoodsMatting 商品抠图

func (*CIService) GoodsMattingWithOpt added in v0.7.41

func (s *CIService) GoodsMattingWithOpt(ctx context.Context, key string, opt *GoodsMattingptions) (*Response, error)

GoodsMattingWithOpt 商品抠图

func (*CIService) IdCardOCRWhenCloud added in v0.7.36

func (s *CIService) IdCardOCRWhenCloud(ctx context.Context, obj string, query *IdCardOCROptions) (*IdCardOCRResult, *Response, error)

func (*CIService) IdCardOCRWhenUpload added in v0.7.36

func (s *CIService) IdCardOCRWhenUpload(ctx context.Context, obj, filePath string, query *IdCardOCROptions, header *ObjectPutOptions) (*IdCardOCRResult, *Response, error)

func (*CIService) ImageAuditing added in v0.7.31

图片审核 支持detect-url等全部参数

func (*CIService) ImageProcess added in v0.7.11

func (s *CIService) ImageProcess(ctx context.Context, name string, opt *ImageProcessOptions) (*ImageProcessResult, *Response, error)

云上数据处理 https://cloud.tencent.com/document/product/460/18147

func (*CIService) ImageQuality added in v0.7.36

func (s *CIService) ImageQuality(ctx context.Context, obj string) (*ImageQualityResult, *Response, error)

ImageQuality 图片质量评估

func (*CIService) ImageQualityWithOpt added in v0.7.42

func (s *CIService) ImageQualityWithOpt(ctx context.Context, obj string, opt *ImageQualityOptions) (*ImageQualityResult, *Response, error)

ImageQualityWithOpt 图片质量评估

func (*CIService) ImageRecognition added in v0.7.11

func (s *CIService) ImageRecognition(ctx context.Context, name string, reserved string) (*ImageRecognitionResult, *Response, error)

图片审核 https://cloud.tencent.com/document/product/460/37318

func (*CIService) ImageSearch added in v0.7.42

func (s *CIService) ImageSearch(ctx context.Context, name string, opt *ImageSearchOptions) (*ImageSearchResult, *Response, error)

ImageSearch 图片搜索接口

func (*CIService) LivenessRecognitionWhenCloud added in v0.7.36

func (s *CIService) LivenessRecognitionWhenCloud(ctx context.Context, obj string, query *LivenessRecognitionOptions) (*LivenessRecognitionResult, *Response, error)

func (*CIService) LivenessRecognitionWhenUpload added in v0.7.36

func (s *CIService) LivenessRecognitionWhenUpload(ctx context.Context, obj, filePath string, query *LivenessRecognitionOptions, header *ObjectPutOptions) (*LivenessRecognitionResult, *Response, error)

func (*CIService) ModifyM3U8Token added in v0.7.42

func (s *CIService) ModifyM3U8Token(ctx context.Context, name string, opt *ModifyM3U8TokenOptions, id ...string) (*Response, error)

ModifyM3U8Token TODO

func (*CIService) OcrRecognition added in v0.7.36

func (s *CIService) OcrRecognition(ctx context.Context, obj string, opt *OcrRecognitionOptions) (*OcrRecognitionResult, *Response, error)

OcrRecognition OCR通用文字识别

func (*CIService) OpenCIService added in v0.7.36

func (s *CIService) OpenCIService(ctx context.Context) (*Response, error)

func (*CIService) OpenOriginProtect added in v0.7.36

func (s *CIService) OpenOriginProtect(ctx context.Context) (*Response, error)

func (*CIService) PausedMediaWorkflow added in v0.7.40

func (s *CIService) PausedMediaWorkflow(ctx context.Context, workflowId string) (*Response, error)

UpdateMediaWorkflow TODO