-
Notifications
You must be signed in to change notification settings - Fork 3
/
model.go
244 lines (203 loc) · 4.06 KB
/
model.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
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
package vod
import (
"github.com/byteplus-sdk/byteplus-sdk-golang/base"
)
type StartWorkflowRequest struct {
Vid string
TemplateId string
Input map[string]interface{}
Priority int
CallbackArgs string
}
type StartWorkflowResult struct {
RunId string
}
type StartWorkflowResp struct {
ResponseMetadata *base.ResponseMetadata
Result *StartWorkflowResult `json:",omitempty"`
}
type UploadMediaByUrlResult struct {
Code int
Message string
}
type UploadMediaByUrlResp struct {
base.CommonResponse
Result UploadMediaByUrlResult
}
type VideoFormat string
const (
MP4 VideoFormat = "mp4"
M3U8 VideoFormat = "m3u8"
)
type UploadMediaByUrlParams struct {
SpaceName string
Format VideoFormat
SourceUrls []string
CallbackArgs string
}
type FileType string
const (
VIDEO FileType = "video"
IMAGE FileType = "image"
OBJECT FileType = "object"
)
type ApplyUploadParam struct {
SpaceName string
SessionKey string
FileType FileType
FileSize int
UploadNum int
}
type ApplyUploadResp struct {
base.CommonResponse
Result ApplyUploadResult
}
type ApplyUploadResult struct {
RequestID string
UploadAddress UploadAddress
}
type UploadAddress struct {
StoreInfos []StoreInfo
UploadHosts []string
UploadHeader map[string]string
SessionKey string
AdvanceOption AdvanceOption
}
type VideoDefinition string
const (
D1080P VideoDefinition = "1080p"
D720P VideoDefinition = "720p"
D540P VideoDefinition = "540p"
D480P VideoDefinition = "480p"
D360P VideoDefinition = "360p"
D240P VideoDefinition = "240p"
)
type StoreInfo struct {
StoreUri string
Auth string
}
type AdvanceOption struct {
Parallel int
Stream int
SliceSize int
}
type ModifyVideoInfoBody struct {
SpaceName string `json:"SpaceName"`
Vid string `json:"Vid"`
Info UserMetaInfo `json:"Info"`
Tags TagControl `json:"Tags"`
}
type UserMetaInfo struct {
Title string
Description string
Category string
PosterUri string
}
type TagControl struct {
Deletes string
Adds string
}
type ModifyVideoInfoResp struct {
ResponseMetadata *base.ResponseMetadata
Result *ModifyVideoInfoBaseResp
}
type ModifyVideoInfoBaseResp struct {
BaseResp *BaseResp
}
type BaseResp struct {
StatusMessage string
StatusCode int
}
type CommitUploadParam struct {
SpaceName string
Body CommitUploadBody
}
type CommitUploadBody struct {
CallbackArgs string
SessionKey string
Functions []Function
}
type Function struct {
Name string
Input interface{}
}
type SnapshotInput struct {
SnapshotTime float64
}
type EntryptionInput struct {
Config map[string]string
PolicyParams map[string]string
}
type OptionInfo struct {
Title string
Tags string
Description string
Category string
RecordType int
Format string
ClassificationId int
}
type WorkflowInput struct {
TemplateId string
}
type CommitUploadResp struct {
base.CommonResponse
Result CommitUploadResult
}
type CommitUploadResult struct {
RequestId string
CallbackArgs string
Results []UploadResult
}
type UploadResult struct {
Vid string
VideoMeta VideoMeta
ImageMeta ImageMeta
ObjectMeta ObjectMeta
Encryption Encryption
SnapshotUri string
}
type VideoMeta struct {
Uri string
Height int
Width int
Duration float64
Bitrate int
Md5 string
Format string
Size int
}
type ImageMeta struct {
Uri string
Height int
Width int
Md5 string
}
type ObjectMeta struct {
Uri string
Md5 string
}
type Encryption struct {
Uri string
SecretKey string
Algorithm string
Version string
SourceMd5 string
Extra map[string]string
}
// SetVideoPublishStatus
type SetVideoPublishStatusResp struct {
ResponseMetadata *base.ResponseMetadata
}
type GetWeightsResp struct {
ResponseMetadata *base.ResponseMetadata
Result map[string]map[string]int `json:",omitempty"`
}
type DomainInfo struct {
MainDomain string
BackupDomain string
}
type ImgUrl struct {
MainUrl string
BackupUrl string
}