Versions in this module Expand all Collapse all v0 v0.0.5 Sep 17, 2022 Changes in this version + const AppIdLength + const VersionLength + func BuildRTCTokenWithUID(appID string, appCertificate string, channelName string, uid string, ...) (string, error) + func BuildRTCTokenWithUserAccount(appID string, appCertificate string, channelName string, userAccount string, ...) (string, error) + func BuildRTMToken(appID string, appCertificate string, userAccount string, ...) (string, error) + type AccessToken struct + func NewAccessToken(appID, appCertificate, channelName string, uid uint32) *AccessToken + func NewAccessTokenFromString(originToken string) (*AccessToken, error) + func NewAccessTokenStrUID(appID, appCertificate, channelName string, uid string) *AccessToken + func (token *AccessToken) AddPrivilege(privilege Privileges, expireTimestamp time.Time) + func (token *AccessToken) Build() (string, error) + type Privileges uint16 + const PrivilegeAdministrateChannel + const PrivilegeJoinChannel + const PrivilegeLoginRtm + const PrivilegePublishAudioStream + const PrivilegePublishDataStream + const PrivilegePublishVideoStream + type RTCRole uint16 + const RoleAdmin + const RolePublisher + const RoleSubscriber