Documentation ¶
Index ¶
- Constants
- func AssertEqual(t *testing.T, expected, actual interface{})
- func AssertNil(t *testing.T, err error)
- func GetUidStr(uid uint32) string
- func Md5(str string) string
- type AccessToken
- type IService
- type Service
- type ServiceChat
- type ServiceEducation
- type ServiceFpa
- type ServiceRtc
- type ServiceRtm
Constants ¶
View Source
const ( Version = "007" VersionLength = 3 // Service type ServiceTypeRtc = 1 ServiceTypeRtm = 2 ServiceTypeFpa = 4 ServiceTypeChat = 5 ServiceTypeEducation = 7 // Rtc PrivilegeJoinChannel = 1 PrivilegePublishAudioStream = 2 PrivilegePublishVideoStream = 3 PrivilegePublishDataStream = 4 // Rtm // Fpa PrivilegeLogin = 1 // Chat PrivilegeChatUser = 1 PrivilegeChatApp = 2 // Education PrivilegeEducationRoomUser = 1 PrivilegeEducationUser = 2 PrivilegeEducationApp = 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 ServiceChat ¶ added in v1.2.0
func NewServiceChat ¶ added in v1.2.0
func NewServiceChat(userId string) (serviceChat *ServiceChat)
type ServiceEducation ¶ added in v1.2.0
func NewServiceEducation ¶ added in v1.2.0
func NewServiceEducation(roomUuid string, userUuid string, role int16) (serviceEducation *ServiceEducation)
type ServiceFpa ¶ added in v1.2.0
type ServiceFpa struct {
*Service
}
func NewServiceFpa ¶ added in v1.2.0
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.