Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountConnectionsMAX ¶
func CountConnectionsMAX() int
Types ¶
type CreateRoomRequest ¶
type CreateRoomRequest struct {
TTL string `json:"time_to_live"`
GameConfigs GameConfigs `json:"gameConfigs"`
}
type GameConfigExecutor ¶
type GameConfigExecutor interface {
Name() string
Execute(clientInfo tokentype.Info, config SortingConfig, newUserData interface{}, oldResult GameConfigResults) (newResult GameConfigResults, err error)
}
type GameConfigResults ¶
type GameConfigs ¶
type GameConfigs struct {
GameID uuid.UUID `json:"game_id" bson:"_id"`
SortingConfig []SortingConfig `json:"sorting_config" bson:"sorting_config"`
IsExists bool `json:"-"`
}
func (*GameConfigs) RemoveSortingConfig ¶
func (g *GameConfigs) RemoveSortingConfig(name string)
type ParamMetadata ¶
type Settings ¶
type Settings struct {
ServerType string `json:"serverType"`
ServerPort string `json:"serverPort"`
ConnectionPort string `json:"connectionPort"`
ServerAddress string `json:"serverAddress"`
MaxConnections int `json:"maxConnections"`
MaxRequestPerSecond int `json:"maxRequestPerSecond"`
}
func NewSettings ¶
func NewSettings() (settings Settings)
type SortingConfig ¶
type SortingConfig struct {
Name string `json:"name" bson:"name"`
Params []ParamMetadata `json:"params" bson:"params"`
UseOnServerType string `json:"use_on_server_type" bson:"use_on_server_type"`
ResultName string `json:"result_name" bson:"result_name"`
ResultType string `json:"result_type" bson:"result_type"`
Executor GameConfigExecutor `json:"-"`
}
Click to show internal directories.
Click to hide internal directories.