74 lines
2.3 KiB
Go
74 lines
2.3 KiB
Go
package model
|
||
|
||
// VideoScanRequest 视频审核请求结构(2.0版本)
|
||
type VideoScanRequest struct {
|
||
Tasks []VideoTask `json:"tasks"`
|
||
Services []string `json:"services"` // 2.0版本使用services而不是scenes
|
||
}
|
||
|
||
// VideoTask 视频任务结构
|
||
type VideoTask struct {
|
||
DataID string `json:"dataId"`
|
||
URL string `json:"url"`
|
||
Interval int `json:"interval,omitempty"` // 截帧间隔,单位秒
|
||
MaxFrames int `json:"maxFrames,omitempty"` // 最大截帧数
|
||
}
|
||
|
||
// VideoScanResponse 视频审核响应结构
|
||
type VideoScanResponse struct {
|
||
Code int `json:"code"`
|
||
Message string `json:"message"`
|
||
Data []struct {
|
||
Code int `json:"code"`
|
||
Message string `json:"message"`
|
||
DataID string `json:"dataId"`
|
||
TaskID string `json:"taskId"`
|
||
URL string `json:"url"`
|
||
} `json:"data"`
|
||
}
|
||
|
||
// VideoResultResponse 视频审核结果响应结构(2.0版本)
|
||
type VideoResultResponse struct {
|
||
Code int `json:"code"`
|
||
Message string `json:"message"`
|
||
Data []struct {
|
||
Code int `json:"code"`
|
||
Message string `json:"message"`
|
||
DataID string `json:"dataId"`
|
||
TaskID string `json:"taskId"`
|
||
Status string `json:"status"`
|
||
Results []struct {
|
||
Scene string `json:"scene"`
|
||
Label string `json:"label"`
|
||
Suggestion string `json:"suggestion"`
|
||
Rate float64 `json:"rate"`
|
||
// 2.0版本新增字段
|
||
SubLabel string `json:"subLabel,omitempty"` // 子标签
|
||
Details []VideoDetail `json:"details,omitempty"` // 详细信息
|
||
Extras map[string]interface{} `json:"extras,omitempty"` // 扩展信息
|
||
Frames []struct {
|
||
Offset int `json:"offset"`
|
||
URL string `json:"url"`
|
||
Results []struct {
|
||
Scene string `json:"scene"`
|
||
Label string `json:"label"`
|
||
Suggestion string `json:"suggestion"`
|
||
Rate float64 `json:"rate"`
|
||
// 2.0版本新增字段
|
||
SubLabel string `json:"subLabel,omitempty"`
|
||
Details []VideoDetail `json:"details,omitempty"`
|
||
Extras map[string]interface{} `json:"extras,omitempty"`
|
||
} `json:"results"`
|
||
} `json:"frames"`
|
||
} `json:"results"`
|
||
} `json:"data"`
|
||
}
|
||
|
||
// VideoDetail 视频审核详细信息
|
||
type VideoDetail struct {
|
||
Context struct {
|
||
Context string `json:"context"`
|
||
Pos []int `json:"pos"`
|
||
} `json:"context"`
|
||
}
|