Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultCost = 10 RtcpPLIInterval = time.Second * 3 )
View Source
const ( AdminCollectionName = "administrators" UsersCollectionName = "users" RoomsCollectionName = "rooms" MessageCollectionName = "messages" FilesCollectionName = "files" FileChunksCollectionName = "fileChunks" AdminCookieName = "Admin" UserCookieName = "User" TimeLayout = "Monday, 02-Jan-06" )
View Source
const ( MessageTypeFile = "File" MessageTypeMessage = "Message" MessageTypeInfo = "Info" MessageTypeClassSession = "ClassSession" MessageTypeClassSessionLink = "MessageTypeClassSessionLink" )
Message type supported by LetsTalk
View Source
const ( NewFileUploadMsgType = "NewFileUpload" NewMessageMsgType = "NewMessage" RequestMessages = "RequestMessages" SearchUserMsgType = "SearchUser" WebsocketOpenMsgType = "WebsocketOpen" CreateRoomMsgType = "CreateRoom" ExitRoomMsgType = "ExitRoom" RequestUsersToJoinRoomMsgType = "RequestUsersToJoinRoom" SentRoomRequestMsgType = "SentRoomRequest" JoinRoomMsgType = "JoinRoom" OnlineStatusMsgType = "OnlineStatus" UploadFileErrorMsgType = "UploadFileError" // UploadFileErrorMsgType is sent to client only. UploadFileSuccessMsgType = "FileUploadSuccess" UploadFileChunkMsgType = "UploadFileChunk" RequestDownloadMsgType = "RequestDownload" DownloadFileChunkMsgType = "DownloadFileChunk" DownloadFileErrorMsgType = "DownloadFileError" // DownloadFileErrorMsgType is sent to client only. DownloadFileSuccessMsgType = "DownloadFileSuccess" // DownloadFileSuccessMsgType is sent to client only. StartClassSession = "StartClassSession" JoinClassSession = "JoinClassSession" NegotiateSDP = "NegotiateSDP" RenegotiateSDP = "RenegotiateSDP" ClassSessionError = "ClassSessionError" EndClassSession = "EndClassSession" )
All websocket message types both clients and server
Variables ¶
View Source
var ( ErrIncorrectUUID = errors.New("incorrect UUID") ErrInvalidExpiryTime = errors.New("invalid expiry time") ErrCookieExpired = errors.New("generated cookie has expired") ErrInvalidUser = errors.New("invalid user") ErrInvalidDetails = errors.New("invalid signin details") ErrRetrieveUUID = errors.New("could not retrieve UUID") ErrMarshal = errors.New("could not marshal content") ErrWrite = errors.New("error while sending content") ErrAuthentication = errors.New("Authentication error") ErrIllicitJoinRequest = errors.New("User was not originally requested to join") ErrUserExistInRoom = errors.New("User already exist in room") ErrUserAlreadyRequested = errors.New("User already requested to join room") ErrUserNotRegisteredToRoom = errors.New("User was not registered to room") ErrFileUpload = errors.New("error while uploading file to server") ErrPeerConnectionNotFound = errors.New("PeerConnection not found") ErrFileUploadLink = errors.New("could not generate file upload link") ErrTokenNotSpecified = errors.New("Token was not specified") ErrInvalidToken = errors.New("Token specified is invalid") )
View Source
var ( // MapEmailToName retrieve user registered name if given an email. // MapEmailToName is concurrent safe as it uses a mutex lock. MapEmailToName = struct { Mapper map[string]string Mutex *sync.RWMutex }{ make(map[string]string), &sync.RWMutex{}, } // PeerConnectionConfig contains peerconnection configuration PeerConnectionConfig = webrtc.Configuration{ SDPSemantics: webrtc.SDPSemanticsUnifiedPlanWithFallback, } )
View Source
var Config configuration
Config contains application environment variables.
Functions ¶
func LoadConfiguration ¶
LoadConfiguration loads all application environment variables.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.