数据工坊 DWR-自定义函数开发规范:结构体示例(GO语言)
时间:2025-02-12 14:54:13
结构体示例(GO语言)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
package maintype CreateTranscodeDynamicSourceBody struct {Transcodes []*CreateTranscodeTaskBody `json:"transcodes"`}type CreateTranscodeTaskBody struct {//源文件存储地址。Input *FileAddr `json:"input,omitempty"`//转码后的视频文件存储地址。Output *FileAddr `json:"output"`//转码模板ID,数组TransTemplateID []int `json:"trans_template_id,omitempty"`//支持图片水印和文字水印,最多支持20个。Watermarks []*Watermark `json:"watermarks,omitempty"`//任务优先级。Priority string `json:"priority,omitempty"`//输出文件名称,每一路转码输出对应一个名称,需要与转码模板ID数组的顺序对应。OutputFilenames []string `json:"output_filenames,omitempty"`}type Watermark struct {Input *FileAddr `json:"input,omitempty"`TemplateID int `json:"template_id,omitempty"`TextContext string `json:"text_context,omitempty"`ImageWatermark *ImageWatermark `json:"image_watermark,omitempty"`TextWatermark *TextWatermark `json:"text_watermark,omitempty"`}type TextWatermark struct {Dx string `json:"dx,omitempty"`Dy string `json:"dy,omitempty"`ReferPos string `json:"referpos,omitempty"`TimelineStart string `json:"timeline_start,omitempty"`TimelineDuration string `json:"timeline_duration,omitempty"`FontName string `json:"font_name,omitempty"`FontSize string `json:"font_size,omitempty"`FontColor string `json:"font_color,omitempty"`Base string `json:"base,omitempty"`}type ImageWatermark struct {Dx string `json:"dx,omitempty"`Dy string `json:"dy,omitempty"`ReferPos string `json:"referpos,omitempty"`TimelineStart string `json:"timeline_start,omitempty"`TimelineDuration string `json:"timeline_duration,omitempty"`ImageProcess string `json:"image_process,omitempty"`Width string `json:"width,omitempty"`Height string `json:"height,omitempty"`Base string `json:"base,omitempty"`}type CreateThumbnailDynamicSourceBody struct {Thumbnails []*ThumbnailCreateTaskBody `json:"thumbnails"`}//FileAddr 文件路径结构定义type FileAddr struct {Location string `json:"location"`BucketName string `json:"bucket"`Object string `json:"object"`}type ThumbnailCreateTaskBody struct {//源文件地址。Input *FileAddr `json:"input"`//输出地址。Output *FileAddr `json:"output"`//是否压缩抽帧图片生成tar包。Tar int `json:"tar,omitempty"`//是否同步处理,同步处理是指不下载全部文件,快速定位到截图位置进行截图。Mode int `json:"sync,omitempty"`//截图参数ThumbnailParam *ThumbnailParam `json:"thumbnail_para"`}type ThumbnailParam struct {Type string `json:"type"`Time int64 `json:"time,omitempty"`StartTime int64 `json:"start_time,omitempty"`Duration int64 `json:"duration,omitempty"`Dots []int64 `json:"dots,omitempty"`Format int64 `json:"format,omitempty"`AspectRatio int64 `json:"aspect_ratio,omitempty"`Width int64 `json:"width,omitempty"`Height int64 `json:"height,omitempty"`MaxLength int64 `json:"max_length,omitempty"`OutputFileName string `json:"output_filename,omitempty"`}type OBSMessages struct {Records []OBSRecord `json:"Records"`}// OBSRecord OBS消息格式type OBSRecord struct {EventVersion string `json:"eventVersion"`EventSource string `json:"eventSource"`EventRegion string `json:"eventRegion"`EventTime string `json:"eventTime"`EventName string `json:"eventName"`UserIdentity UserIdentity `json:"userIdentity"`RequestParameters RequestParameters `json:"requestParameters"`ResponseElements ResponseElements `json:"responseElements"`Obs *OBSInfo `json:"obs"`}// UserIdentity 用户idtype UserIdentity struct {ID string `json:"ID,omitempty"`}//RequestParameters 原始请求参数type RequestParameters struct {SourceIPAddress string `json:"sourceIPAddress,omitempty"`}//ResponseElements 响应参数type ResponseElements struct {OBSRequestID string `json:"x-obs-request-id"`OBSID2 string `json:"x-obs-id-2"`}//OBSInfo OBS信息type OBSInfo struct {Version string `json:"Version"`ConfigurationID string `json:"configurationId"`Bucket BucketInfo `json:"bucket"`Object ObjectInfo `json:"object"`}//BucketInfo 桶信息type BucketInfo struct {Name string `json:"name"`OwnerIdentity UserIdentity `json:"ownerIdentity"`Bucket string `json:"bucket"`}//ObjectInfo 对象信息type ObjectInfo struct {Key string `json:"key"`Tag string `json:"eTag"`Size uint64 `json:"size"`VersionID string `json:"versionId"`Sequencer string `json:"sequencer"`}type Payload struct {ExecutionName string `json:"execution_name"`GraphName string `json:"graph_name"`OBSMessagesDynamicSource interface{} `json:"dynamic_source"`Inputs map[string]interface{} `json:"inputs"`} |
support.huaweicloud.com/usermanual-dwr/dwr_03_0008.html
看了此文的人还看了
CDN加速
GaussDB
文字转换成语音
免费的服务器
如何创建网站
域名网站购买
私有云桌面
云主机哪个好
域名怎么备案
手机云电脑
SSL证书申请
云点播服务器
免费OCR是什么
电脑云桌面
域名备案怎么弄
语音转文字
文字图片识别
云桌面是什么
网址安全检测
网站建设搭建
国外CDN加速
SSL免费证书申请
短信批量发送
图片OCR识别
云数据库MySQL
个人域名购买
录音转文字
扫描图片识别文字
OCR图片识别
行驶证识别
虚拟电话号码
电话呼叫中心软件
怎么制作一个网站
Email注册网站
华为VNC
图像文字识别
企业网站制作
个人网站搭建
华为云计算
免费租用云托管
云桌面云服务器
ocr文字识别免费版
HTTPS证书申请
图片文字识别转换
国外域名注册商
使用免费虚拟主机
云电脑主机多少钱
鲲鹏云手机
短信验证码平台
OCR图片文字识别
SSL证书是什么
申请企业邮箱步骤
免费的企业用邮箱
云免流搭建教程
域名价格
推荐文章
- 华为GaussDB自定义函数_GaussDB教程_华为高斯数据库自定义函数
- GaussDB数据库自定义函数_GaussDB 华为_高斯数据库自定义函数
- ModelArts推理部署_创建AI应用_自定义镜像规范-华为云
- ModelArts推理部署_OBS导入_模型包规范-华为云
- 图片处理服务哪家好_好用的AI处理服务_数据分析处理平台
- 什么是函数工作流_函数托管计算服务_函数工作流 FunctionGraph-华为云
- 数据治理中心_数据开发_数据开发示例_使用教程-华为云
- 数据仓库的特点_华为云数据工坊处理数据好用吗_好用的数据处理方案
- 华为云CodeArts API_API设计支持公共模型
- 函数流管理_编排无服务器_函数工作流 FunctionGraph-华为云
ServerLess102