Documentation ¶
Index ¶
- func CompletePublish(publishId string) (err error)
- func CreateNewPublish(userId int, streamId, streamTitle string, streamQuality, streamOrientation int) (publishId string, err error)
- func CreateNewUser(mobile, pwd, name, email string) (err error)
- func GetLiveStreamList(videoList *[]LiveVideo) (err error)
- func GetLiveVideoByPublishId(publishId string, liveVideo *LiveVideo) (err error)
- func GetLiveVideoList(videoList *[]LiveVideo) (err error)
- func GetMyLiveVideoList(userId int, videoList *[]LiveVideo) (err error)
- func GetSession(sessionId string) (userId int, err error)
- func GetStreamIdOfUser(userId int) (streamId string, err error)
- func InitOrm(cfg *config.OrmConfig) (err error)
- func IsEmailExists(email string) (exists bool, err error)
- func IsMobileExists(mobile string) (exists bool, err error)
- func IsNameExists(name string) (exists bool, err error)
- func IsStreamPublishing(streamId string) (publishing bool, err error)
- func SetSession(userId int, sessionId string) (err error)
- func SetStreamIdOfUser(userId int, streamId string) (err error)
- type LiveStream
- type LiveVideo
- type Session
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateNewPublish ¶
func CreateNewPublish(userId int, streamId, streamTitle string, streamQuality, streamOrientation int) (publishId string, err error)
@param streamId @param streamTitle @return publishId if err==nil and pubilshId==nil, not allow taken streamId can only be taken once a time
func CreateNewUser ¶
create new user, if mobile exists, err it
func GetLiveStreamList ¶
@return videoList
func GetLiveVideoByPublishId ¶
func GetMyLiveVideoList ¶
@return videoList
func GetSession ¶
func GetStreamIdOfUser ¶
@param user id @return err if exec error @return streamId not empty or empty(stands for none)
func IsEmailExists ¶
@param email check whether email exists
func IsMobileExists ¶
@param mobile check whether mobile exists
func IsNameExists ¶
@param name check whether name exists
func IsStreamPublishing ¶
@param streamId
func SetSession ¶
func SetStreamIdOfUser ¶
@param user id @param stream id @return exec error
Types ¶
type LiveStream ¶
type LiveVideo ¶
type LiveVideo struct { Id int User *User `orm:"column(user_id);rel(fk)"` PublishId string `orm:"column(publish_id);size(32)"` Title string `orm:"column(title);size(100)"` StreamId string `orm:"column(stream_id);size(32)"` StartTime int64 `orm:"column(start_time)"` EndTime int64 `orm:"column(end_time)"` Quality int `orm:"column(quality)"` Orientation int `orm:"column(orientation)"` CreateTime time.Time `orm:"column(create_time);auto_now_add"` }
Click to show internal directories.
Click to hide internal directories.