151 lines
6.2 KiB
Go
151 lines
6.2 KiB
Go
package proxy
|
|
|
|
import "time"
|
|
|
|
type objreq struct {
|
|
Name string `json:"fileName"`
|
|
Data string `json:"fileData"`
|
|
}
|
|
|
|
type Obj struct {
|
|
Domain string `json:"domain"`
|
|
Name string `json:"fileName"`
|
|
}
|
|
|
|
type objresp struct {
|
|
Code int `json:"code"`
|
|
Object Obj `json:"data"`
|
|
Msg string `json:"msg"`
|
|
}
|
|
|
|
type ShardBody struct {
|
|
TaskId string `json:"taskId,omitempty"` // 文档md5
|
|
Pos int `json:"pos,omitempty"` // 位置
|
|
FileData string `json:"fileData,omitempty"` // 数据
|
|
Type string `json:"type,omitempty"`
|
|
TotalPos int `json:"totalPos,omitempty"` // 分片总数
|
|
}
|
|
|
|
type Data struct {
|
|
Id string `json:"id,omitempty"`
|
|
VideoUri string `json:"videoUri,omitempty"`
|
|
}
|
|
|
|
type Result struct {
|
|
Code int `json:"code,omitempty"` //
|
|
Data Data `json:"data,omitempty"` //
|
|
Msg string `json:"msg,omitempty"` //
|
|
}
|
|
|
|
type VideoOkResult struct {
|
|
Code int `json:"code,omitempty"`
|
|
Msg string `json:"msg,omitempty"` //
|
|
Data string `json:"data,omitempty"`
|
|
}
|
|
|
|
type BaseInfo struct {
|
|
ID string `json:"id,omitempty"`
|
|
Title string `json:"title,omitempty"` // 标题
|
|
CheckSum string `json:"checkSum,omitempty"` // md5校验码
|
|
VideoTime int32 `json:"videTime"` // 影片时长
|
|
Publish string `bson:"publish,omitempty"` // 视频发布者
|
|
Type string `json:"type"` // 视频:长视频/短视频--时间阈值
|
|
Preview int32 `json:"preview"` // 预览普通视频:1:预览 2:
|
|
Country string `json:"country"` // 国家 (国产、日本、欧美.... 前端固定)
|
|
FirstTag string `json:"firstTag,omitempty"` // 一级标签
|
|
SecondTags []string `json:"secondTags,omitempty"` // 二级标签标签
|
|
CoverImg []string `json:"coverImg,omitempty"` // 封面
|
|
PreFileName string `json:"preFileName,omitempty"` // 预览文件
|
|
Status string `json:"status,omitempty"` // 当前状态
|
|
Size int64 `json:"size"` // 文件size,单位byte
|
|
Filename string `json:"filename,omitempty"` // 文件名称
|
|
Desc string `json:"desc,omitempty"` // 详细描述
|
|
Directors []string `json:"director,omitempty"` // 导演
|
|
Actors []string `json:"actors,omitempty"` // 演员
|
|
Studio string `json:"studio,omitempty"` // 工作室
|
|
Bango string `json:"bango,omitempty"` // 番号,唯一
|
|
Via string `json:"via,omitempty"` // 来源
|
|
Remark string `json:"remark,omitempty"` // 备注
|
|
AddedTime string `json:"addedTime,omitempty"` // 上架时间
|
|
UploadTime string `json:"uploadTime,omitempty"` // 上传时间
|
|
}
|
|
|
|
type VideoUpdate struct {
|
|
ID string `json:"id,omitempty"`
|
|
Title *string `json:"title,omitempty"` // 标题
|
|
Publish *string `bson:"publish,omitempty"` // 视频发布者
|
|
Type *string `json:"type"` // 视频:长视频/短视频--时间阈值
|
|
Preview *int32 `json:"preview"` // 预览:1:预览 2:普通视频
|
|
Country *string `json:"country"` // 国家 (国产、日本、欧美.... 前端固定)
|
|
FirstTag *string `json:"firstTag,omitempty"` // 一级标签
|
|
SecondTags *[]string `json:"secondTags,omitempty"` // 二级标签标签
|
|
CoverImg *[]string `json:"coverImg,omitempty"` // 封面
|
|
PreFileName *string `json:"preFileName,omitempty"` // 预览文件
|
|
Status *string `json:"status,omitempty"` // 当前状态
|
|
Desc *string `json:"desc,omitempty"` // 详细描述
|
|
Directors *[]string `json:"director,omitempty"` // 导演
|
|
Actors *[]string `json:"actors,omitempty"` // 演员
|
|
Studio *string `json:"studio,omitempty"` // 工作室
|
|
Bango *string `json:"bango,omitempty"` // 番号,唯一
|
|
Via *string `json:"via,omitempty"` // 来源
|
|
Remark *string `json:"remark,omitempty"` // 备注
|
|
AddedTime *string `json:"addedTime,omitempty"` // 上架时间
|
|
UploadTime *string `json:"uploadTime,omitempty"` // 上传时间
|
|
}
|
|
|
|
type VideoSearch struct {
|
|
ID string `json:"id,omitempty"`
|
|
Title *string `json:"title,omitempty"` // 标题
|
|
Publish *string `bson:"publish,omitempty"` // 视频发布者
|
|
Type *string `json:"type"` // 视频:长视频/短视频--时间阈值
|
|
Preview *int32 `json:"preview"` // 预览:1:预览 2:普通视频
|
|
Country *string `json:"country"` // 国家 (国产、日本、欧美.... 前端固定)
|
|
FirstTag *string `json:"firstTag,omitempty"` // 一级标签
|
|
SecondTags *[]string `json:"secondTags,omitempty"` // 二级标签标签
|
|
Status *string `json:"status,omitempty"` // 当前状态
|
|
Directors *[]string `json:"director,omitempty"` // 导演
|
|
Actors *[]string `json:"actors,omitempty"` // 演员
|
|
Studio *string `json:"studio,omitempty"` // 工作室
|
|
Bango *string `json:"bango,omitempty"` // 番号,唯一
|
|
Via *string `json:"via,omitempty"` // 来源
|
|
Remark *string `json:"remark,omitempty"` // 备注
|
|
AddedTime *string `json:"addedTime,omitempty"` // 上架时间
|
|
UploadTime *string `json:"uploadTime,omitempty"` // 上传时间
|
|
Start *time.Time `json:"start"` // 开始时间
|
|
End *time.Time `json:"end"` // 结束时间
|
|
}
|
|
|
|
type UploadVideoBodyResp struct {
|
|
Id string `json:"id"` // 文件服返回的上传文件Id
|
|
VideoUri string `json:"videoUri"` // 文件服返回的视频uri
|
|
}
|
|
|
|
type MediaSearchReq struct {
|
|
PageNum int64 `json:"pageNum"`
|
|
PageSize int64 `json:"pageSize"`
|
|
Param *VideoSearch `json:"param"`
|
|
}
|
|
|
|
//MediaSearchReq 媒体搜索请求返回
|
|
type MediaSearchResp struct {
|
|
Total int64 `json:"total"`
|
|
List []BaseInfo `json:"list"`
|
|
}
|
|
|
|
type MediasDelReq struct {
|
|
Ids []string `json:"id"`
|
|
}
|
|
|
|
//MediasDelResp 请求批量删除媒体回复
|
|
type MediasDelResp struct {
|
|
}
|
|
|
|
type MediasUpdateReq struct {
|
|
Ids []string `json:"id"`
|
|
VideoUpdate
|
|
}
|
|
|
|
//MediasUpdateResp 请求批量更新媒体回复
|
|
type MediasUpdateResp struct {
|
|
}
|