Documentation
¶
Index ¶
Constants ¶
View Source
const ( Version = "007" VersionLength = 3 // Service type ServiceTypeRtc = 1 ServiceTypeRtm = 2 ServiceTypeFpa = 4 ServiceTypeChat = 5 ServiceTypeApaas = 7 // Rtc PrivilegeJoinChannel = 1 PrivilegePublishAudioStream = 2 PrivilegePublishVideoStream = 3 PrivilegePublishDataStream = 4 // Rtm // Fpa PrivilegeLogin = 1 // Chat PrivilegeChatUser = 1 PrivilegeChatApp = 2 // Apaas PrivilegeApaasRoomUser = 1 PrivilegeApaasUser = 2 PrivilegeApaasApp = 3 )
Variables ¶
This section is empty.
Functions ¶
func AssertEqual ¶
Types ¶
type AccessToken ¶
type AccessToken struct {
AppCert string
AppId string
Expire uint32
IssueTs uint32
Salt uint32
Services map[uint16]IService
}
func CreateAccessToken ¶
func CreateAccessToken() (accessToken *AccessToken)
func NewAccessToken ¶
func NewAccessToken(appId string, appCert string, expire uint32) (accessToken *AccessToken)
func (*AccessToken) AddService ¶
func (accessToken *AccessToken) AddService(service IService)
func (*AccessToken) Build ¶
func (accessToken *AccessToken) Build() (res string, err error)
type ServiceApaas ¶
func NewServiceApaas ¶
func NewServiceApaas(roomUuid string, userUuid string, role int16) (serviceApaas *ServiceApaas)
type ServiceChat ¶
func NewServiceChat ¶
func NewServiceChat(userId string) (serviceChat *ServiceChat)
type ServiceFpa ¶
type ServiceFpa struct {
*Service
}
func NewServiceFpa ¶
func NewServiceFpa() (serviceFpa *ServiceFpa)
type ServiceRtc ¶
func NewServiceRtc ¶
func NewServiceRtc(channelName string, uid string) (serviceRtc *ServiceRtc)
type ServiceRtm ¶
func NewServiceRtm ¶
func NewServiceRtm(userId string) (serviceRtm *ServiceRtm)
Click to show internal directories.
Click to hide internal directories.