struct.go
4.4 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
package aliyun
import "fmt"
var (
OssErrFileFormat = fmt.Errorf("文件格式有错")
)
//创建视频上传凭证
/*CreateUploadVideo */
type CreateUploadVideoRequest struct {
FileName string `json:"fileName"`
Title string `json:"title"`
}
type CreateUploadVideoResponse struct {
FileName string `json:"fileName"`
RequestId string `json:"requestId"`
VideoId string `json:"videoId"`
UploadAddress string `json:"uploadAddress"`
UploadAuth string `json:"uploadAuth"`
FileURL string `json:"fileURL"`
}
/*CreateUploadVideos */
type CreateUploadVideosRequest struct {
Items []*CreateUploadVideoRequest `json:"items"`
}
type CreateUploadVideosResponse struct {
List []*CreateUploadVideoResponse `json:"list"`
}
//刷新视频上传凭证 RefreshUploadVideo
type RefreshUploadVideoRequest struct {
VideoId string `json:"videoId" valid:"Required;"`
}
type RefreshUploadVideoResponse struct {
RequestId string `json:"requestId"`
VideoId string `json:"videoId"`
UploadAddress string `json:"uploadAddress"`
UploadAuth string `json:"uploadAuth"`
FileURL string `json:"fileURL"`
}
/*GetPlayInfo 获取播放信息*/
type GetPlayInfoRequest struct {
VideoId string `json:"videoId" xml:"VideoId"`
}
// GetPlayInfoResponse is the response struct for api GetPlayInfo
type GetPlayInfoResponse struct {
//*responses.BaseResponse
//RequestId string `json:"RequestId" xml:"RequestId"`
VideoBase VideoBase `json:"VideoBase" xml:"VideoBase"`
PlayInfoList PlayInfoListInGetPlayInfo `json:"PlayInfoList" xml:"PlayInfoList"`
}
/*获取视频播放凭证*/
type GetVideoPlayAuthRequest struct {
VideoId string `json:"videoId" xml:"VideoId"`
}
// VideoBase is a nested struct in vod response
type VideoBase struct {
OutputType string `json:"OutputType" xml:"OutputType"`
CoverURL string `json:"CoverURL" xml:"CoverURL"`
Duration string `json:"Duration" xml:"Duration"`
Status string `json:"Status" xml:"Status"`
Title string `json:"Title" xml:"Title"`
VideoId string `json:"VideoId" xml:"VideoId"`
MediaType string `json:"MediaType" xml:"MediaType"`
CreationTime string `json:"CreationTime" xml:"CreationTime"`
TranscodeMode string `json:"TranscodeMode" xml:"TranscodeMode"`
//ThumbnailList ThumbnailListInGetPlayInfo `json:"ThumbnailList" xml:"ThumbnailList"`
}
type PlayInfoListInGetPlayInfo struct {
PlayInfo []PlayInfo `json:"PlayInfo" xml:"PlayInfo"`
}
// PlayInfo is a nested struct in vod response
type PlayInfo struct {
JobId string `json:"JobId" xml:"JobId"`
Format string `json:"Format" xml:"Format"`
PreprocessStatus string `json:"PreprocessStatus" xml:"PreprocessStatus"`
EncryptType string `json:"EncryptType" xml:"EncryptType"`
Fps string `json:"Fps" xml:"Fps"`
ModificationTime string `json:"ModificationTime" xml:"ModificationTime"`
NarrowBandType string `json:"NarrowBandType" xml:"NarrowBandType"`
Bitrate string `json:"Bitrate" xml:"Bitrate"`
Encrypt int64 `json:"Encrypt" xml:"Encrypt"`
Rand string `json:"Rand" xml:"Rand"`
CreationTime string `json:"CreationTime" xml:"CreationTime"`
StreamType string `json:"StreamType" xml:"StreamType"`
Height int64 `json:"Height" xml:"Height"`
WatermarkId string `json:"WatermarkId" xml:"WatermarkId"`
Duration string `json:"Duration" xml:"Duration"`
Complexity string `json:"Complexity" xml:"Complexity"`
Width int64 `json:"Width" xml:"Width"`
Size int64 `json:"Size" xml:"Size"`
Status string `json:"Status" xml:"Status"`
Definition string `json:"Definition" xml:"Definition"`
Plaintext string `json:"Plaintext" xml:"Plaintext"`
PlayURL string `json:"PlayURL" xml:"PlayURL"`
Specification string `json:"Specification" xml:"Specification"`
}
//GetVideoPlayAuthResponse is the response struct for api GetVideoPlayAuth
type GetVideoPlayAuthResponse struct {
RequestId string `json:"requestId" xml:"RequestId"`
PlayAuth string `json:"playAuth" xml:"PlayAuth"`
VideoMeta VideoMeta `json:"videoMeta" xml:"VideoMeta"`
}
// VideoMeta is a nested struct in vod response
type VideoMeta struct {
CoverURL string `json:"coverURL" xml:"CoverURL"`
Duration float64 `json:"duration" xml:"Duration"`
Status string `json:"-" xml:"Status"`
Title string `json:"title" xml:"Title"`
VideoId string `json:"videoId" xml:"VideoId"`
}