Documentation ¶
Index ¶
Constants ¶
View Source
const ( KJoinChannel = 1 KPublishAudioStream = 2 KPublishVideoStream = 3 KPublishDataStream = 4 KPublishAudiocdn = 5 KPublishVideoCdn = 6 KRequestPublishAudioStream = 7 KRequestPublishVideoStream = 8 KRequestPublishDataStream = 9 KInvitePublishAudioStream = 10 KInvitePublishVideoStream = 11 KInvitePublishDataStream = 12 KAdministrateChannel = 101 KLoginRtm = 1000 )
View Source
const APP_ID_LENGTH = 32
View Source
const VERSION_LENGTH = 3
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessToken ¶
type AccessToken struct { AppID string AppCertificate string ChannelName string UidStr string Ts uint32 Salt uint32 Message map[uint16]uint32 Signature string CrcChannelName uint32 CrcUid uint32 MsgRawContent string }
func CreateAccessToken ¶
func CreateAccessToken(appID, appCertificate, channelName string, uid uint32) AccessToken
func CreateAccessToken2 ¶
func CreateAccessToken2(appID, appCertificate, channelName string, uid string) AccessToken
func (*AccessToken) AddPrivilege ¶
func (token *AccessToken) AddPrivilege(privilege Privileges, expireTimestamp uint32)
func (*AccessToken) Build ¶
func (token *AccessToken) Build() (string, error)
func (*AccessToken) FromString ¶
func (token *AccessToken) FromString(originToken string) bool
type Privileges ¶
type Privileges uint16
Click to show internal directories.
Click to hide internal directories.