rtmtokenbuilder

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2020 License: MIT Imports: 1 Imported by: 5

Documentation

Index

Constants

View Source
const (
	RoleRtmUser = 1
)

Role consts

Variables

This section is empty.

Functions

func BuildToken

func BuildToken(appID string, appCertificate string, userAccount string, role Role, privilegeExpiredTs uint32) (string, error)

BuildToken method appID: The App ID issued to you by Agora. Apply for a new App ID from

Agora Dashboard if it is missing from your kit. See Get an App ID.

appCertificate: Certificate of the application that you registered in

the Agora Dashboard. See Get an App Certificate.

userAccount: The user account. role: Role_Rtm_User = 1 privilegeExpireTs: represented by the number of seconds elapsed since

1/1/1970. If, for example, you want to access the
Agora Service within 10 minutes after the token is
generated, set expireTimestamp as the current
timestamp + 600 (seconds)./

Types

type Role added in v0.1.4

type Role uint16

Role Type

type RtmTokenBuilder added in v0.1.4

type RtmTokenBuilder struct {
}

RtmTokenBuilder class

Jump to

Keyboard shortcuts

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