ugc

package
v0.0.0-...-59ebc2b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//LiveRestAPIURL rest url
	LiveRestAPIURL = "http://api.danghongyun.com/rest"
	//Version version
	Version = "2.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	ID             int64 `json:"id"`
	Status         int64 `json:"status"`
	CurrentSession int64 `json:"current_session"` //current_session
}

Channel 频道

type ChannelInfoRespParam

type ChannelInfoRespParam struct {
	Code    int     `json:"code"`    // 整型错误码,0成功,其它值失败
	Message string  `json:"message"` // 字符串,可能包含错误或者别的一些信息
	Success bool    `json:"success"` // true 或 false
	Result  Channel `json:"result"`  // 字符串,返回的结果
}

ChannelInfoRespParam 频道信息返回

type ChannelSessionRespParam

type ChannelSessionRespParam struct {
	Code    int            `json:"code"`    // 整型错误码,0成功,其它值失败
	Message string         `json:"message"` // 字符串,可能包含错误或者别的一些信息
	Success bool           `json:"success"` // true 或 false
	Result  CurrentSession `json:"result"`  // 字符串,返回的结果
}

ChannelSessionRespParam 会话信息返回

type CurrentSession

type CurrentSession struct {
	ID        int64       `json:"id"`
	Status    int64       `json:"status"`
	Play      string      `json:"play"`
	Push      string      `json:"push"`
	URL       interface{} `json:"url"`
	HLS       string      `json:"hls"`
	Thumbnail string      `json:"thumbnail"`
}

CurrentSession 当前激活的会话信息

type DHLiveManager

type DHLiveManager struct {
	Client      *client.Client
	Credentials *auth.Credentials
}

DHLiveManager 提供了对直播进行管理的操作

func NewLiveManager

func NewLiveManager(cred *auth.Credentials) *DHLiveManager

NewLiveManager 用来构建一个新的直播管理对象

func NewLiveManagerEx

func NewLiveManagerEx(cred *auth.Credentials, clt *client.Client) *DHLiveManager

NewLiveManagerEx 用来构建一个新的直播管理对象

func (*DHLiveManager) BlockChannel

func (ctl *DHLiveManager) BlockChannel(ID string) (*ChannelInfoRespParam, error)

BlockChannel 屏蔽频道

func (*DHLiveManager) CreateChannel

func (ctl *DHLiveManager) CreateChannel(name string) (*ChannelInfoRespParam, error)

CreateChannel 新增频道

func (*DHLiveManager) CreateChannelSession

func (ctl *DHLiveManager) CreateChannelSession(ID string) (*ChannelSessionRespParam, error)

CreateChannelSession 创建会话信息

func (*DHLiveManager) DeleteChannel

func (ctl *DHLiveManager) DeleteChannel(ID string) (*ChannelInfoRespParam, error)

DeleteChannel 删除频道

func (*DHLiveManager) DeleteChannelSession

func (ctl *DHLiveManager) DeleteChannelSession(ID string) (*ChannelSessionRespParam, error)

DeleteChannelSession 删除会话信息

func (*DHLiveManager) EditChannel

func (ctl *DHLiveManager) EditChannel(ID, name string) (*ChannelInfoRespParam, error)

EditChannel 修改频道

func (*DHLiveManager) GetChannelInfo

func (ctl *DHLiveManager) GetChannelInfo(ID string) (*ChannelInfoRespParam, error)

GetChannelInfo 频道信息

func (*DHLiveManager) GetChannelSessionInfo

func (ctl *DHLiveManager) GetChannelSessionInfo(ID string) (*ChannelSessionRespParam, error)

GetChannelSessionInfo 获取会话信息

func (*DHLiveManager) RestoreChannel

func (ctl *DHLiveManager) RestoreChannel(ID string) (*ChannelInfoRespParam, error)

RestoreChannel 恢复频道

func (*DHLiveManager) StopChannelSession

func (ctl *DHLiveManager) StopChannelSession(ID string) (*ChannelSessionRespParam, error)

StopChannelSession 停止会话信息

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL