Skip to content

Commit

Permalink
单元测试补充
Browse files Browse the repository at this point in the history
  • Loading branch information
lilang committed Mar 14, 2023
1 parent 22ea4f9 commit e6c9884
Show file tree
Hide file tree
Showing 2 changed files with 1,965 additions and 68 deletions.
136 changes: 78 additions & 58 deletions ci_media.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ type Video struct {
Pixfmt string `xml:"Pixfmt,omitempty"`
LongShortMode string `xml:"LongShortMode,omitempty"`
Rotate string `xml:"Rotate,omitempty"`
AnimateOnlyKeepKeyFrame string `xml:"AnimateOnlyKeepKeyFrame"`
AnimateTimeIntervalOfFrame string `xml:"AnimateTimeIntervalOfFrame"`
AnimateFramesPerSecond string `xml:"AnimateFramesPerSecond"`
Quality string `xml:"Quality"`
AnimateOnlyKeepKeyFrame string `xml:"AnimateOnlyKeepKeyFrame,omitempty"`
AnimateTimeIntervalOfFrame string `xml:"AnimateTimeIntervalOfFrame,omitempty"`
AnimateFramesPerSecond string `xml:"AnimateFramesPerSecond,omitempty"`
Quality string `xml:"Quality,omitempty"`
}

// TranscodeProVideo TODO
Expand Down Expand Up @@ -255,17 +255,19 @@ type ConcatTemplate struct {
Container *Container `xml:"Container,omitempty"`
Index string `xml:"Index,omitempty"`
AudioMix *AudioMix `xml:"AudioMix,omitempty"`
AudioMixArray []AudioMix `xml:"AudioMixArray,omitempty"`
}

// SpriteSnapshotConfig TODO
type SpriteSnapshotConfig struct {
CellHeight string `xml:"CellHeight,omitempty"`
CellWidth string `xml:"CellWidth,omitempty"`
Color string `xml:"Color,omitempty"`
Columns string `xml:"Columns,omitempty"`
Lines string `xml:"Lines,omitempty"`
Margin string `xml:"Margin,omitempty"`
Padding string `xml:"Padding,omitempty"`
CellHeight string `xml:"CellHeight,omitempty"`
CellWidth string `xml:"CellWidth,omitempty"`
Color string `xml:"Color,omitempty"`
Columns string `xml:"Columns,omitempty"`
Lines string `xml:"Lines,omitempty"`
Margin string `xml:"Margin,omitempty"`
Padding string `xml:"Padding,omitempty"`
ScaleMethod string `xml:"ScaleMethod,omitempty"`
}

// Snapshot TODO
Expand All @@ -288,14 +290,14 @@ type Snapshot struct {
// AnimationVideo TODO
// 有意和转码区分,两种任务关注的参数不一样避免干扰
type AnimationVideo struct {
Codec string `xml:"Codec"`
Width string `xml:"Width"`
Height string `xml:"Height"`
Fps string `xml:"Fps"`
AnimateOnlyKeepKeyFrame string `xml:"AnimateOnlyKeepKeyFrame"`
AnimateTimeIntervalOfFrame string `xml:"AnimateTimeIntervalOfFrame"`
AnimateFramesPerSecond string `xml:"AnimateFramesPerSecond"`
Quality string `xml:"Quality"`
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"`
}

// Animation TODO
Expand Down Expand Up @@ -354,16 +356,16 @@ type VoiceSeparate struct {

// ColorEnhance TODO
type ColorEnhance struct {
Enable string `xml:"Enable"`
Contrast string `xml:"Contrast"`
Correction string `xml:"Correction"`
Saturation string `xml:"Saturation"`
Enable string `xml:"Enable,omitempty"`
Contrast string `xml:"Contrast,omitempty"`
Correction string `xml:"Correction,omitempty"`
Saturation string `xml:"Saturation,omitempty"`
}

// MsSharpen TODO
type MsSharpen struct {
Enable string `xml:"Enable"`
SharpenLevel string `xml:"SharpenLevel"`
Enable string `xml:"Enable,omitempty"`
SharpenLevel string `xml:"SharpenLevel,omitempty"`
}

// VideoProcess TODO
Expand Down Expand Up @@ -613,9 +615,12 @@ type PicProcessResult struct {

// PicProcessJobOperation TODO
type PicProcessJobOperation struct {
TemplateId string `xml:"TemplateId,omitempty"`
PicProcess *PicProcess `xml:"PicProcess,omitempty"`
PicProcessResult *PicProcessResult `xml:"PicProcessResult,omitempty"`
Output *JobOutput `xml:"Output,omitempty"`
UserData string `xml:"UserData,omitempty"`
JobLevel int `xml:"JobLevel,omitempty"`
PicProcessResult *PicProcessResult `xml:"PicProcessResult,omitempty"`
}

// MediaProcessJobOperation TODO
Expand Down Expand Up @@ -656,12 +661,16 @@ type MediaProcessJobOperation struct {

// CreatePicJobsOptions TODO
type CreatePicJobsOptions struct {
XMLName xml.Name `xml:"Request"`
Tag string `xml:"Tag,omitempty"`
Input *JobInput `xml:"Input,omitempty"`
Operation *PicProcessJobOperation `xml:"Operation,omitempty"`
QueueId string `xml:"QueueId,omitempty"`
CallBack string `xml:"CallBack,omitempty"`
XMLName xml.Name `xml:"Request"`
Tag string `xml:"Tag,omitempty"`
Input *JobInput `xml:"Input,omitempty"`
Operation *PicProcessJobOperation `xml:"Operation,omitempty"`
QueueId string `xml:"QueueId,omitempty"`
CallBack string `xml:"CallBack,omitempty"`
QueueType string `xml:"QueueType,omitempty"`
CallBackFormat string `xml:"CallBackFormat,omitempty"`
CallBackType string `xml:"CallBackType,omitempty"`
CallBackMqConfig *NotifyConfigCallBackMqConfig `xml:"CallBackMqConfig,omitempty"`
}

// CreateAIJobsOptions TODO
Expand Down Expand Up @@ -1302,7 +1311,7 @@ type PostSnapshotOptions struct {

type PostSnapshotResult struct {
XMLName xml.Name `xml:"Response"`
Output *JobOutput `xml:"Output, omitempty"`
Output *JobOutput `xml:"Output,omitempty"`
}

// PostSnapshot
Expand Down Expand Up @@ -1353,6 +1362,7 @@ func (s *CIService) GetPrivateM3U8(ctx context.Context, name string, opt *GetPri
type TriggerWorkflowOptions struct {
WorkflowId string `url:"workflowId"`
Object string `url:"object"`
Name string `url:"name"`
}

// TriggerWorkflowResult TODO
Expand Down Expand Up @@ -1380,13 +1390,14 @@ func (s *CIService) TriggerWorkflow(ctx context.Context, opt *TriggerWorkflowOpt
// DescribeWorkflowExecutionsOptions TODO
type DescribeWorkflowExecutionsOptions struct {
WorkflowId string `url:"workflowId,omitempty"`
Name string `url:"Name,omitempty"`
Name string `url:"name,omitempty"`
OrderByTime string `url:"orderByTime,omitempty"`
NextToken string `url:"nextToken,omitempty"`
Size int `url:"size,omitempty"`
States string `url:"states,omitempty"`
StartCreationTime string `url:"startCreationTime,omitempty"`
EndCreationTime string `url:"endCreationTime,omitempty"`
JobId string `url:"jobId,omitempty"`
}

// WorkflowExecutionList TODO
Expand All @@ -1406,7 +1417,7 @@ type DescribeWorkflowExecutionsResult struct {
}

// DescribeWorkflowExecutions TODO
// 获取工作流实例列表 https://cloud.tencent.com/document/product/460/45950
// 获取工作流实例列表 https://cloud.tencent.com/document/product/460/80050
func (s *CIService) DescribeWorkflowExecutions(ctx context.Context, opt *DescribeWorkflowExecutionsOptions) (*DescribeWorkflowExecutionsResult, *Response, error) {
var res DescribeWorkflowExecutionsResult
sendOpt := sendOptions{
Expand Down Expand Up @@ -1648,16 +1659,23 @@ type ASRJobOperation struct {
Output *JobOutput `xml:"Output,omitempty"`
SpeechRecognition *SpeechRecognition `xml:"SpeechRecognition,omitempty"`
SpeechRecognitionResult *SpeechRecognitionResult `xml:"SpeechRecognitionResult,omitempty"`
TemplateId string `xml:"TemplateId,omitempty"`
UserData string `xml:"UserData,omitempty"`
JobLevel int `xml:"JobLevel,omitempty"`
}

// CreateASRJobsOptions TODO
type CreateASRJobsOptions struct {
XMLName xml.Name `xml:"Request"`
Tag string `xml:"Tag,omitempty"`
Input *JobInput `xml:"Input,omitempty"`
Operation *ASRJobOperation `xml:"Operation,omitempty"`
QueueId string `xml:"QueueId,omitempty"`
CallBack string `xml:"CallBack,omitempty"`
XMLName xml.Name `xml:"Request"`
Tag string `xml:"Tag,omitempty"`
Input *JobInput `xml:"Input,omitempty"`
Operation *ASRJobOperation `xml:"Operation,omitempty"`
QueueId string `xml:"QueueId,omitempty"`
CallBack string `xml:"CallBack,omitempty"`
QueueType string `xml:"QueueType,omitempty"`
CallBackFormat string `xml:"CallBackFormat,omitempty"`
CallBackType string `xml:"CallBackType,omitempty"`
CallBackMqConfig *NotifyConfigCallBackMqConfig `xml:"CallBackMqConfig,omitempty"`
}

// ASRJobDetail TODO
Expand Down Expand Up @@ -1783,15 +1801,16 @@ type CreateMediaSnapshotTemplateOptions struct {

// CreateMediaTranscodeTemplateOptions TODO
type CreateMediaTranscodeTemplateOptions struct {
XMLName xml.Name `xml:"Request"`
Tag string `xml:"Tag,omitempty"`
Name string `xml:"Name,omitempty"`
Container *Container `xml:"Container,omitempty"`
Video *Video `xml:"Video,omitempty"`
Audio *Audio `xml:"Audio,omitempty"`
TimeInterval *TimeInterval `xml:"TimeInterval,omitempty"`
TransConfig *TransConfig `xml:"TransConfig,omitempty"`
AudioMix *AudioMix `xml:"AudioMix,omitempty"`
XMLName xml.Name `xml:"Request"`
Tag string `xml:"Tag,omitempty"`
Name string `xml:"Name,omitempty"`
Container *Container `xml:"Container,omitempty"`
Video *Video `xml:"Video,omitempty"`
Audio *Audio `xml:"Audio,omitempty"`
TimeInterval *TimeInterval `xml:"TimeInterval,omitempty"`
TransConfig *TransConfig `xml:"TransConfig,omitempty"`
AudioMix *AudioMix `xml:"AudioMix,omitempty"`
AudioMixArray []AudioMix `xml:"AudioMixArray,omitempty"`
}

// CreateMediaAnimationTemplateOptions TODO
Expand Down Expand Up @@ -1823,14 +1842,15 @@ type CreateMediaVideoProcessTemplateOptions struct {

// CreateMediaVideoMontageTemplateOptions TODO
type CreateMediaVideoMontageTemplateOptions struct {
XMLName xml.Name `xml:"Request"`
Tag string `xml:"Tag,omitempty"`
Name string `xml:"Name,omitempty"`
Duration string `xml:"Duration,omitempty"`
Container *Container `xml:"Container,omitempty"`
Video *Video `xml:"Video,omitempty"`
Audio *Audio `xml:"Audio,omitempty"`
AudioMix *AudioMix `xml:"AudioMix,omitempty"`
XMLName xml.Name `xml:"Request"`
Tag string `xml:"Tag,omitempty"`
Name string `xml:"Name,omitempty"`
Duration string `xml:"Duration,omitempty"`
Container *Container `xml:"Container,omitempty"`
Video *Video `xml:"Video,omitempty"`
Audio *Audio `xml:"Audio,omitempty"`
AudioMix *AudioMix `xml:"AudioMix,omitempty"`
AudioMixArray []AudioMix `xml:"AudioMixArray,omitempty"`
}

// CreateMediaVoiceSeparateTemplateOptions TODO
Expand Down

0 comments on commit e6c9884

Please sign in to comment.