Documentation ¶
Index ¶
- Constants
- type QueryService
- func (q *QueryService) GetCZDocInfo(w http.ResponseWriter, r *http.Request, p httprouter.Params)
- func (q *QueryService) GetCZDocList(w http.ResponseWriter, r *http.Request, p httprouter.Params)
- func (q *QueryService) GetCZRandomDocList(w http.ResponseWriter, r *http.Request, p httprouter.Params)
- func (q *QueryService) GetCZRandomVideoList(w http.ResponseWriter, r *http.Request, p httprouter.Params)
- func (q *QueryService) GetCZSimilVideoInfo(w http.ResponseWriter, r *http.Request, p httprouter.Params)
- func (q *QueryService) GetCZVideoInfo(w http.ResponseWriter, r *http.Request, p httprouter.Params)
- func (q *QueryService) GetRandomVideoList(w http.ResponseWriter, r *http.Request, p httprouter.Params)
- func (q *QueryService) GetVideoInfo(w http.ResponseWriter, r *http.Request, p httprouter.Params)
- func (q *QueryService) GetVideoList(w http.ResponseWriter, r *http.Request, p httprouter.Params)
- func (q *QueryService) GetVideoPlayURL(w http.ResponseWriter, r *http.Request, p httprouter.Params)
- func (q *QueryService) Service() error
- type VideoService
Constants ¶
View Source
const ( CHANIDEMPTY = "channel id cannot be empty!" IDEMPTY = "id cannot be empty!" INDEXEMPTY = "index cannot be empty!" KEYSEMPTY = "kyes cannot be empty!" TYPESERROR = "type error!" CHANIDNOTEXIST = "this channel does not exist!" QUERYVIDEOERR = "get video list failed!" QUERYDOCERROR = "get doc list failed!" PARSEERROR = "parse object failed!" TIMEEMPTY = "timestamp cannot be empty!" )
View Source
const ( // APIV1 当前API版本 APIV1 = "/v1" // GETVIDEOINFO 获取指定视频实际播放地址 GETVIDEOINFO = "/video/get" // GETVIDEOLIST 获取指定频道的视频数据 GETVIDEOLIST = "/video/get/:chanid/:time" // GETRANDOMVIDEOLIST 获取指定频道的随机视频数据 GETRANDOMVIDEOLIST = "/video/random/get/:chanid" // GETCZRANDOMVIDEOLIST 获取指定频道的随机视频数据 GETCZRANDOMVIDEOLIST = "/video/czrandom/get/:chanid" // GETVIDEOBYID 获取指定ID的视频信息 GETVIDEOBYID = "/video/info/:id" // GETCZVIDEOBYID 获取指定ID的锤子视频信息 GETCZVIDEOBYID = "/video/czinfo/:id" GETCZSIMILVIDEOBYKEYS = "/video/simila" // GETVIDEOURL 获取视频真实播放地址 GETVIDEOURL = "/video/url" // GETCZRANDOMDOCLIST 获取指定频道的随机新闻数据 GETCZRANDOMDOCLIST = "/doc/czrandom/:chanid" // GETCZDOCLIST 获取指定频道指定时间戳之后的新闻数据 GETCZDOCLIST = "/doc/czdata/:chanid/:time" // GetDocContent 获取指定ID的新闻内容 GetDocContent = "/doc/content/:chanid/:id" // SYNCPARAM 同步频道码参数 SYNCPARAM = "/sync/param" )
View Source
const ( // ERROR 通用错误码 ERROR = 501 // URLEMPTY URL参数为空 URLEMPTY = "URL Can not be empty!" // PARSE_VIDEO_ERROR 解析视频数据失败 PARSE_VIDEO_ERROR = "Get Video Failed!" // VIDEO_LENGTH_ERROR 视频长度错误 VIDEO_LENGTH_ERROR = "Video Length Error!" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QueryService ¶
QueryService 提供视频列表查询服务
func (*QueryService) GetCZDocInfo ¶
func (q *QueryService) GetCZDocInfo(w http.ResponseWriter, r *http.Request, p httprouter.Params)
func (*QueryService) GetCZDocList ¶
func (q *QueryService) GetCZDocList(w http.ResponseWriter, r *http.Request, p httprouter.Params)
func (*QueryService) GetCZRandomDocList ¶
func (q *QueryService) GetCZRandomDocList(w http.ResponseWriter, r *http.Request, p httprouter.Params)
func (*QueryService) GetCZRandomVideoList ¶
func (q *QueryService) GetCZRandomVideoList(w http.ResponseWriter, r *http.Request, p httprouter.Params)
GetRandomVideoList 获取随机视频列表 当前如果没有最新视频物料时,从库存中随机挑选10条视频返回给用户
func (*QueryService) GetCZSimilVideoInfo ¶
func (q *QueryService) GetCZSimilVideoInfo(w http.ResponseWriter, r *http.Request, p httprouter.Params)
GetCZSimilVideoInfo 获取相似视频信息
func (*QueryService) GetCZVideoInfo ¶
func (q *QueryService) GetCZVideoInfo(w http.ResponseWriter, r *http.Request, p httprouter.Params)
GetCZVideoInfo 获取视频信息 id 视频id值
func (*QueryService) GetRandomVideoList ¶
func (q *QueryService) GetRandomVideoList(w http.ResponseWriter, r *http.Request, p httprouter.Params)
GetRandomVideoList 获取随机视频列表 当前如果没有最新视频物料时,从库存中随机挑选10条视频返回给用户
func (*QueryService) GetVideoInfo ¶
func (q *QueryService) GetVideoInfo(w http.ResponseWriter, r *http.Request, p httprouter.Params)
GetVideoInfo 获取视频信息 id 视频id值
func (*QueryService) GetVideoList ¶
func (q *QueryService) GetVideoList(w http.ResponseWriter, r *http.Request, p httprouter.Params)
GetVideoList 获取视频列表 chanid channel id值
func (*QueryService) GetVideoPlayURL ¶
func (q *QueryService) GetVideoPlayURL(w http.ResponseWriter, r *http.Request, p httprouter.Params)
GetVideoPlayURL 获取视频真实播放地址
type VideoService ¶
VideoService 提供视频地址查询服务
func (*VideoService) GetVideoInfo ¶
func (rs *VideoService) GetVideoInfo(w http.ResponseWriter, r *http.Request, p httprouter.Params)
GetVideoInfo 获取视频实际播放地址
Click to show internal directories.
Click to hide internal directories.