Documentation ¶
Index ¶
- Constants
- Variables
- func CheckAuthValid(sessionId, accessToken string, vResult *ApiResult) (userId int, valid bool)
- func GetMyLivePlayUrls(sessionId, accessToken string, pResult *MyLivePlayUrlsResult)
- func GetMyVideoList(sessionId, accessToken string, vResult *PlaybackVideoListResult)
- func GetPublishingList(sessionId, accessToken string, vResult *PublishingVideoListResult)
- func GetStream(sessionId, accessToken string, gResult *GetStreamResult)
- func GetStreamPlayResult(sessionId, accessToken, publishId string, pResult *StreamPlayResult)
- func GetVideoList(sessionId, accessToken string, vResult *PlaybackVideoListResult)
- func GetVideoPlayResult(sessionId, accessToken, publishId string, pResult *VideoPlayResult)
- func StartPublish(sessionId, accessToken, streamTitle, streamId, streamQualityStr, ... string, ...)
- func StatusPublish(sessionId, accessToken, streamId string, pResult *StreamPublishStatus)
- func StopPublish(sessionId, accessToken, publishId string, pResult *StopPublishResult)
- func UserLogin(mobile, pwd string, loginResult *LoginResult)
- func UserSignup(mobile, pwd, name, email string, signupResult *SignupResult)
- type ApiResult
- type GetStreamResult
- type LoginResult
- type MyLivePlayUrlsResult
- type PlaybackVideo
- type PlaybackVideoListResult
- type PublishingVideo
- type PublishingVideoListResult
- type SignupResult
- type StartPublishResult
- type StopPublishResult
- type StreamPlayResult
- type StreamPublishStatus
- type VideoPlayResult
Constants ¶
View Source
const ( API_OK = 1000 API_SERVER_ERROR = 1001 API_PARAM_ERROR = 1002 API_UNAUTHORIZED_ERROR = 1003 API_SESSION_EXPIRED_ERROR = 1004 //login error API_USER_NOT_FOUND_ERROR = 1100 API_USER_PWD_ERROR = 1101 //signup error API_PHONE_EXISTS_ERROR = 1201 API_NAME_EXISTS_ERROR = 1202 API_EMAIL_EXISTS_ERROR = 1203 //publish error API_STREAM_IS_TAKEN_ERROR = 1401 API_NO_VIDEO_FOUND_ERROR = 1501 )
Variables ¶
View Source
var ApiStatus = map[int]string{ API_PARAM_ERROR: "param error, %s", API_SERVER_ERROR: "internal server error", API_UNAUTHORIZED_ERROR: "access not allowed error", API_SESSION_EXPIRED_ERROR: "session expired error", API_USER_NOT_FOUND_ERROR: "user not found error", API_USER_PWD_ERROR: "user password error", API_PHONE_EXISTS_ERROR: "phone exists error", API_NAME_EXISTS_ERROR: "name exists error", API_EMAIL_EXISTS_ERROR: "email exists error", API_STREAM_IS_TAKEN_ERROR: "stream is already publishing error", API_NO_VIDEO_FOUND_ERROR: "video is not found error", }
Functions ¶
func CheckAuthValid ¶
func GetMyLivePlayUrls ¶
func GetMyLivePlayUrls(sessionId, accessToken string, pResult *MyLivePlayUrlsResult)
func GetMyVideoList ¶
func GetMyVideoList(sessionId, accessToken string, vResult *PlaybackVideoListResult)
func GetPublishingList ¶
func GetPublishingList(sessionId, accessToken string, vResult *PublishingVideoListResult)
func GetStream ¶
func GetStream(sessionId, accessToken string, gResult *GetStreamResult)
func GetStreamPlayResult ¶
func GetStreamPlayResult(sessionId, accessToken, publishId string, pResult *StreamPlayResult)
func GetVideoList ¶
func GetVideoList(sessionId, accessToken string, vResult *PlaybackVideoListResult)
////////////////////
func GetVideoPlayResult ¶
func GetVideoPlayResult(sessionId, accessToken, publishId string, pResult *VideoPlayResult)
func StartPublish ¶
func StartPublish(sessionId, accessToken, streamTitle, streamId, streamQualityStr, streamOrientationStr string, pResult *StartPublishResult)
func StatusPublish ¶
func StatusPublish(sessionId, accessToken, streamId string, pResult *StreamPublishStatus)
func StopPublish ¶
func StopPublish(sessionId, accessToken, publishId string, pResult *StopPublishResult)
func UserLogin ¶
func UserLogin(mobile, pwd string, loginResult *LoginResult)
@param mobile @param pwd @output loginResult @return ok, not found, error
func UserSignup ¶
func UserSignup(mobile, pwd, name, email string, signupResult *SignupResult)
@param mobile @param pwd @output signupResult @return ok, user exists, error
Types ¶
type ApiResult ¶
func (*ApiResult) SetFormatCode ¶
type GetStreamResult ¶
type GetStreamResult struct { ApiResult StreamId string `json:"streamId,omitempty"` Stream string `json:"stream,omitempty"` }
func (*GetStreamResult) SetOk ¶
func (this *GetStreamResult) SetOk()
type LoginResult ¶
type LoginResult struct { ApiResult UserName string `json:"userName,omitempty"` SessionId string `json:"sessionId,omitempty"` }
func (*LoginResult) SetOk ¶
func (this *LoginResult) SetOk()
type MyLivePlayUrlsResult ¶
type MyLivePlayUrlsResult struct { ApiResult LivePlayUrls map[string]string `json:"livePlayUrls,omitempty"` }
func (*MyLivePlayUrlsResult) SetOk ¶
func (this *MyLivePlayUrlsResult) SetOk()
type PlaybackVideo ¶
type PlaybackVideoListResult ¶
type PlaybackVideoListResult struct { ApiResult VideoList []PlaybackVideo `json:"videoList,omitempty"` }
func (*PlaybackVideoListResult) SetOk ¶
func (this *PlaybackVideoListResult) SetOk()
type PublishingVideo ¶
type PublishingVideoListResult ¶
type PublishingVideoListResult struct { ApiResult VideoList []PublishingVideo `json:"videoList,omitempty"` }
func (*PublishingVideoListResult) SetOk ¶
func (this *PublishingVideoListResult) SetOk()
type SignupResult ¶
type SignupResult struct {
ApiResult
}
func (*SignupResult) SetOk ¶
func (this *SignupResult) SetOk()
type StartPublishResult ¶
func (*StartPublishResult) SetOk ¶
func (this *StartPublishResult) SetOk()
type StopPublishResult ¶
type StopPublishResult struct {
ApiResult
}
func (*StopPublishResult) SetOk ¶
func (this *StopPublishResult) SetOk()
type StreamPlayResult ¶
type StreamPlayResult struct { ApiResult Orientation int `json:"orientation"` PlayUrls map[string]string `json:"playUrls,omitempty"` }
func (*StreamPlayResult) SetOk ¶
func (this *StreamPlayResult) SetOk()
type StreamPublishStatus ¶
type StreamPublishStatus struct {
ApiResult
}
func (*StreamPublishStatus) SetOk ¶
func (this *StreamPublishStatus) SetOk()
type VideoPlayResult ¶
type VideoPlayResult struct { ApiResult Orientation int `json:"orientation"` PlayUrls map[string]string `json:"playUrls,omitempty"` }
func (*VideoPlayResult) SetOk ¶
func (this *VideoPlayResult) SetOk()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.