Documentation ¶
Index ¶
- Constants
- Variables
- func AppMessageNamespace(appID repository.AppID) bus.MessageNamespace
- func AuthorizationModuleFactory(b bus.Bus) app.BackendModuleFactory
- func ConsoleModuleFactory() app.BackendModuleFactory
- func FileModuleFactory(dataDir string, bus bus.Bus) app.BackendModuleFactory
- func HighscoreModuleFactory(repo *repository.Repository) app.BackendModuleFactory
- func LifecycleModuleFactory(bus bus.Bus) app.BackendModuleFactory
- func NetModuleFactory(b bus.Bus) app.BackendModuleFactory
- func RPCModuleFactory(bus bus.Bus) app.BackendModuleFactory
- func StoreModuleFactory(dataDir string) app.BackendModuleFactory
- func TimerModuleFactory() app.BackendModuleFactory
- func UserModuleFactory(repo repository.UserRepository) app.BackendModuleFactory
- type AppDatabaseMixin
- type AuthorizationModule
- type ConsoleModule
- type FileEntry
- type FileModule
- type HighscoreModule
- type LifecycleModule
- type MessageBackendMessage
- type MessageDownloadRequest
- type MessageDownloadResponse
- type MessageFrontendMessage
- type MessageUploadRequest
- type MessageUploadResponse
- type MessageUserConnected
- type MessageUserDisconnected
- type NetModule
- type RPCError
- type RPCModule
- type RPCRequest
- type RPCResponse
- type StoreModule
- type TimerModule
- type UserModule
Constants ¶
View Source
const ( MessageTypeUploadRequest bus.MessageType = "uploadRequest" MessageTypeUploadResponse bus.MessageType = "uploadResponse" MessageTypeDownloadRequest bus.MessageType = "downloadRequest" MessageTypeDownloadResponse bus.MessageType = "downloadResponse" )
View Source
const ( MessageTypeFrontendMessage bus.MessageType = "frontendMessage" MessageTypeBackendMessage bus.MessageType = "backendMessage" MessageTypeUserConnected bus.MessageType = "userConnected" MessageTypeUserDisconnected bus.MessageType = "userDisconnected" )
View Source
const (
MessageNamespace bus.MessageNamespace = "module"
)
Variables ¶
View Source
var ErrUnexpectedArgumentsNumber = errors.New("unexpected number of arguments")
Functions ¶
func AppMessageNamespace ¶
func AppMessageNamespace(appID repository.AppID) bus.MessageNamespace
func AuthorizationModuleFactory ¶
func AuthorizationModuleFactory(b bus.Bus) app.BackendModuleFactory
func ConsoleModuleFactory ¶
func ConsoleModuleFactory() app.BackendModuleFactory
func FileModuleFactory ¶
func FileModuleFactory(dataDir string, bus bus.Bus) app.BackendModuleFactory
func HighscoreModuleFactory ¶
func HighscoreModuleFactory(repo *repository.Repository) app.BackendModuleFactory
func LifecycleModuleFactory ¶
func LifecycleModuleFactory(bus bus.Bus) app.BackendModuleFactory
func NetModuleFactory ¶
func NetModuleFactory(b bus.Bus) app.BackendModuleFactory
func RPCModuleFactory ¶
func RPCModuleFactory(bus bus.Bus) app.BackendModuleFactory
func StoreModuleFactory ¶
func StoreModuleFactory(dataDir string) app.BackendModuleFactory
func TimerModuleFactory ¶
func TimerModuleFactory() app.BackendModuleFactory
func UserModuleFactory ¶
func UserModuleFactory(repo repository.UserRepository) app.BackendModuleFactory
Types ¶
type AppDatabaseMixin ¶
type AppDatabaseMixin struct {
// contains filtered or unexported fields
}
func NewAppDatabaseMixin ¶
func NewAppDatabaseMixin(dataDir string, dbName string, appID repository.AppID) *AppDatabaseMixin
func (*AppDatabaseMixin) WithCollectionTx ¶
type AuthorizationModule ¶
type AuthorizationModule struct {
// contains filtered or unexported fields
}
func (*AuthorizationModule) Export ¶
func (m *AuthorizationModule) Export(export *goja.Object)
func (*AuthorizationModule) Name ¶
func (m *AuthorizationModule) Name() string
type ConsoleModule ¶
type ConsoleModule struct {
// contains filtered or unexported fields
}
func (*ConsoleModule) Export ¶
func (m *ConsoleModule) Export(export *goja.Object)
func (*ConsoleModule) Name ¶
func (m *ConsoleModule) Name() string
type FileModule ¶
type FileModule struct {
// contains filtered or unexported fields
}
func (*FileModule) Export ¶
func (m *FileModule) Export(export *goja.Object)
func (*FileModule) Name ¶
func (m *FileModule) Name() string
type HighscoreModule ¶
type HighscoreModule struct {
// contains filtered or unexported fields
}
func (*HighscoreModule) Export ¶
func (m *HighscoreModule) Export(export *goja.Object)
func (*HighscoreModule) Name ¶
func (m *HighscoreModule) Name() string
type LifecycleModule ¶
type LifecycleModule struct {
// contains filtered or unexported fields
}
func (*LifecycleModule) Export ¶
func (m *LifecycleModule) Export(export *goja.Object)
func (*LifecycleModule) Name ¶
func (m *LifecycleModule) Name() string
type MessageBackendMessage ¶
type MessageBackendMessage struct { UserID repository.UserID Data interface{} // contains filtered or unexported fields }
func NewMessageBackendMessage ¶
func NewMessageBackendMessage(appID repository.AppID, userID repository.UserID, data interface{}) *MessageBackendMessage
func (*MessageBackendMessage) MessageNamespace ¶
func (m *MessageBackendMessage) MessageNamespace() bus.MessageNamespace
func (*MessageBackendMessage) MessageType ¶
func (m *MessageBackendMessage) MessageType() bus.MessageType
type MessageDownloadRequest ¶
type MessageDownloadRequest struct { AppID repository.AppID UserID repository.UserID RequestID string FileID string // contains filtered or unexported fields }
func NewMessageDownloadRequest ¶
func NewMessageDownloadRequest(appID repository.AppID, userID repository.UserID, fileID string) *MessageDownloadRequest
func (*MessageDownloadRequest) MessageNamespace ¶
func (m *MessageDownloadRequest) MessageNamespace() bus.MessageNamespace
func (*MessageDownloadRequest) MessageType ¶
func (m *MessageDownloadRequest) MessageType() bus.MessageType
type MessageDownloadResponse ¶
type MessageDownloadResponse struct { AppID repository.AppID UserID repository.UserID RequestID string Allow bool File io.ReadCloser ContentType string Filename string Size int64 // contains filtered or unexported fields }
func NewMessageDownloadResponse ¶
func NewMessageDownloadResponse(appID repository.AppID, userID repository.UserID, requestID string) *MessageDownloadResponse
func (*MessageDownloadResponse) MessageNamespace ¶
func (m *MessageDownloadResponse) MessageNamespace() bus.MessageNamespace
func (*MessageDownloadResponse) MessageType ¶
func (e *MessageDownloadResponse) MessageType() bus.MessageType
type MessageFrontendMessage ¶
type MessageFrontendMessage struct { UserID repository.UserID Data map[string]interface{} // contains filtered or unexported fields }
func NewMessageFrontedMessage ¶
func NewMessageFrontedMessage(appID repository.AppID, userID repository.UserID, data map[string]interface{}) *MessageFrontendMessage
func (*MessageFrontendMessage) MessageNamespace ¶
func (m *MessageFrontendMessage) MessageNamespace() bus.MessageNamespace
func (*MessageFrontendMessage) MessageType ¶
func (m *MessageFrontendMessage) MessageType() bus.MessageType
type MessageUploadRequest ¶
type MessageUploadRequest struct { AppID repository.AppID UserID repository.UserID RequestID string Header *multipart.FileHeader File multipart.File Metadata map[string]interface{} // contains filtered or unexported fields }
func NewMessageUploadRequest ¶
func NewMessageUploadRequest(appID repository.AppID, userID repository.UserID, header *multipart.FileHeader, file multipart.File, metadata map[string]interface{}) *MessageUploadRequest
func (*MessageUploadRequest) MessageNamespace ¶
func (m *MessageUploadRequest) MessageNamespace() bus.MessageNamespace
func (*MessageUploadRequest) MessageType ¶
func (m *MessageUploadRequest) MessageType() bus.MessageType
type MessageUploadResponse ¶
type MessageUploadResponse struct { AppID repository.AppID UserID repository.UserID RequestID string FileID string Allow bool // contains filtered or unexported fields }
func NewMessageUploadResponse ¶
func NewMessageUploadResponse(appID repository.AppID, userID repository.UserID, requestID string) *MessageUploadResponse
func (*MessageUploadResponse) MessageNamespace ¶
func (m *MessageUploadResponse) MessageNamespace() bus.MessageNamespace
func (*MessageUploadResponse) MessageType ¶
func (m *MessageUploadResponse) MessageType() bus.MessageType
type MessageUserConnected ¶
type MessageUserConnected struct { UserID repository.UserID IsAdmin bool // contains filtered or unexported fields }
func NewMessageUserConnected ¶
func NewMessageUserConnected(appID repository.AppID, userID repository.UserID, isAdmin bool) *MessageUserConnected
func (*MessageUserConnected) MessageNamespace ¶
func (m *MessageUserConnected) MessageNamespace() bus.MessageNamespace
func (*MessageUserConnected) MessageType ¶
func (m *MessageUserConnected) MessageType() bus.MessageType
type MessageUserDisconnected ¶
type MessageUserDisconnected struct { UserID repository.UserID // contains filtered or unexported fields }
func NewMessageUserDisconnected ¶
func NewMessageUserDisconnected(appID repository.AppID, userID repository.UserID) *MessageUserDisconnected
func (*MessageUserDisconnected) MessageNamespace ¶
func (m *MessageUserDisconnected) MessageNamespace() bus.MessageNamespace
func (*MessageUserDisconnected) MessageType ¶
func (m *MessageUserDisconnected) MessageType() bus.MessageType
type RPCRequest ¶
type RPCRequest struct { Method string Params interface{} ID interface{} UserID repository.UserID }
type RPCResponse ¶
type RPCResponse struct { Result interface{} Error *RPCError ID interface{} UserID repository.UserID }
type StoreModule ¶
type StoreModule struct {
// contains filtered or unexported fields
}
func (*StoreModule) Export ¶
func (m *StoreModule) Export(export *goja.Object)
func (*StoreModule) Name ¶
func (m *StoreModule) Name() string
func (*StoreModule) WithCollectionTx ¶
type TimerModule ¶
type TimerModule struct {
// contains filtered or unexported fields
}
func (*TimerModule) Export ¶
func (m *TimerModule) Export(export *goja.Object)
func (*TimerModule) Name ¶
func (m *TimerModule) Name() string
type UserModule ¶
type UserModule struct {
// contains filtered or unexported fields
}
func (*UserModule) Export ¶
func (m *UserModule) Export(export *goja.Object)
func (*UserModule) Name ¶
func (m *UserModule) Name() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.