Documentation ¶
Index ¶
- Constants
- func BuildToken(appID string, appCertificate string, userAccount string, role RTMRole, ...) (string, error)
- func BuildTokenWithUID(appID string, appCertificate string, channelName string, uid uint32, ...) (string, error)
- func BuildTokenWithUserAccount(appID string, appCertificate string, channelName string, userAccount string, ...) (string, error)
- func GETQueryRecord(mode int8, sid string, rsid string) (int, error)
- func GetCandidateExamineeIDStr(uid uint) string
- func GetCandidateMeetingNo(env string, id uint) string
- func GetExamineeIDStr(uid uint) string
- func GetInviteMeetingNo(env string, examroomID uint, uids []uint, uid uint, isDualCamera int8) string
- func GetMeetingNo(env string, id uint) string
- func GetPageSize(isDualCamera int8) int
- func GetRecordURL(mode int8, sid string, cname string, uid uint) (string, string)
- func GetServerIDStr() string
- func GetToken(cname string, uidStr string) (string, string, error)
- func GetTotalPage(total int, isDualCamera int8) int8
- func GetWrittenMeetingNo(env string, examroomID uint, uids []uint, uid uint, isDualCamera int8) string
- func Init()
- func ToInviteMeetingNo(env string, examroomID uint, pageN int8) string
- func ToWrittenMeetingNo(env string, examroomID uint, pageN int8) string
- type AcquireModel
- type KickingResponseModel
- type QueryResp
- type RTCRole
- type RTMRole
- type ResponseModel
- type RtcTokenBuilder
- type RtmTokenBuilder
- type ServerResponse
- type StartRecordModel
- func POSTIndividualStartRecord(cname string, uid string, resourceID string) (*StartRecordModel, error)
- func POSTMixStartRecord(cname string, uid string, resourceID string) (*StartRecordModel, error)
- func POSTMixStartRecord2(cname string, uid string, resourceID string, userID uint) (*StartRecordModel, error)
- type StatusModel
Constants ¶
const ( MixRecord = 2 IndividualReocord = 3 )
record mode
const ( Recording = 1 NotRecord = 2 )
const ( RoleAttendee = 0 RolePublisher = 1 RoleSubscriber = 2 RoleAdmin = 101 )
Role consts
const (
RoleRtmUser = 1
)
Role consts
Variables ¶
This section is empty.
Functions ¶
func BuildToken ¶
func BuildToken(appID string, appCertificate string, userAccount string, role RTMRole, 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)./
func BuildTokenWithUID ¶
func BuildTokenWithUID(appID string, appCertificate string, channelName string, uid uint32, role RTCRole, privilegeExpiredTs uint32) (string, error)
BuildTokenWithUID 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.
channelName:Unique channel name for the AgoraRTC session in the string format userAccount: The user account. role: Role_Publisher = 1: A broadcaster (host) in a live-broadcast profile.
Role_Subscriber = 2: (Default) A audience in a live-broadcast profile.
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
func BuildTokenWithUserAccount ¶
func BuildTokenWithUserAccount(appID string, appCertificate string, channelName string, userAccount string, role RTCRole, privilegeExpiredTs uint32) (string, error)
BuildTokenWithUserAccount 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.
channelName:Unique channel name for the AgoraRTC session in the string format uid: User ID. A 32-bit unsigned integer with a value ranging from
1 to (232-1). optionalUid must be unique.
role: Role_Publisher = 1: A broadcaster (host) in a live-broadcast profile.
Role_Subscriber = 2: (Default) A audience in a live-broadcast profile.
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)./
func GETQueryRecord ¶
GETQueryRecord - 查询录制状态
func GetCandidateExamineeIDStr ¶
GetCandidateExamineeIDStr - 获取考生idstr
func GetCandidateMeetingNo ¶
GetCandidateMeetingNo - 获取侯考场id
func GetInviteMeetingNo ¶
func GetInviteMeetingNo(env string, examroomID uint, uids []uint, uid uint, isDualCamera int8) string
GetInviteMeetingNo - 获取面试候考区考场id
func GetRecordURL ¶
GetRecordURL - 获取录制url
func GetWrittenMeetingNo ¶
func GetWrittenMeetingNo(env string, examroomID uint, uids []uint, uid uint, isDualCamera int8) string
GetWrittenMeetingNo - 获取笔试考场id
func ToInviteMeetingNo ¶
拼接面试候考区考场id
Types ¶
type AcquireModel ¶
type AcquireModel struct {
ResourceID string `json:"resourceId"`
}
func POSTAcquire ¶
func POSTAcquire(cname string, uid string) (*AcquireModel, error)
POSTAcquire return acquire
type KickingResponseModel ¶
func KickingRule ¶
func KickingRule(cname string, uid string) (*KickingResponseModel, error)
KickingRule - 踢人
type QueryResp ¶
type QueryResp struct { ResourceID string `json:"resourceId"` Sid string `json:"sid"` ServerResponse struct { FileListMode string `json:"fileListMode"` FileList []struct { Filename string `json:"filename"` TrackType string `json:"trackType"` UID string `json:"uid"` MixedAllUser bool `json:"mixedAllUser"` IsPlayable bool `json:"isPlayable"` SliceStartTime int64 `json:"sliceStartTime"` } `json:"fileList"` Status string `json:"status"` SliceStartTime int64 `json:"sliceStartTime"` } `json:"serverResponse"` }
type ResponseModel ¶
type ResponseModel struct { StartRecordModel ServerResp ServerResponse `json:"serverResponse"` }
func POSTStopRecord ¶
func POSTStopRecord(mode int8, sid string, rsid string, cname string, uid string) (*ResponseModel, error)
POSTStopRecord - 停止录制
type ServerResponse ¶
type StartRecordModel ¶
type StartRecordModel struct { AcquireModel SID string `json:"sid"` }
func POSTIndividualStartRecord ¶
func POSTIndividualStartRecord(cname string, uid string, resourceID string) (*StartRecordModel, error)
POSTIndividualStartRecord - 开启录制
func POSTMixStartRecord ¶
func POSTMixStartRecord(cname string, uid string, resourceID string) (*StartRecordModel, error)
POSTMixStartRecord - 开启录制
func POSTMixStartRecord2 ¶
func POSTMixStartRecord2(cname string, uid string, resourceID string, userID uint) (*StartRecordModel, error)
POSTMixStartRecord - 开启录制