Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultCost = 10 RtcpPLIInterval = time.Second * 3 )
View Source
const ( AdminCollectionName = "administrators" UsersCollectionName = "users" RoomsCollectionName = "Rooms" FilesCollectionName = "files" FileChunksCollectionName = "fileChunks" AdminCookieName = "Admin" UserCookieName = "User" TimeLayout = "Monday, 02-Jan-06 15:04:05" )
View Source
const ( NewFileUploadMsgType = "NewFileUpload" NewMessageMsgType = "NewMessage" RequestAllMessagesMsgType = "RequestAllMessages" SearchUserMsgType = "SearchUser" WebsocketOpenMsgType = "WebsocketOpen" NewRoomCreatedMsgType = "NewRoomCreated" ExitRoomMsgType = "ExitRoom" RequestUsersToJoinRoomMsgType = "RequestUsersToJoinRoom" UserJoinedRoomMsgType = "UserJoinedRoom" 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 = "RenegotiateSDP" ClassSessionError = "ClassSessionError" )
All request 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") )
View Source
var ( // MapEmailToName maps user email to name MapEmailToName map[string]string // 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 ¶
type MessageType ¶
type MessageType int
const ( // Files are saved as base64 format to database then if queried, TXT MessageType = iota INFO FILE )
Click to show internal directories.
Click to hide internal directories.