Documentation ¶
Index ¶
- type Config
- type Manager
- func (mgr *Manager) ArchiveServer(address string) (err error)
- func (mgr *Manager) GetActiveServers() (servers int, err error)
- func (mgr *Manager) GetInactiveServers() (servers int, err error)
- func (mgr *Manager) GetServer(address string) (server types.Server, found bool, err error)
- func (mgr *Manager) GetServers(pageNum int, pageSize types.PageSize, sort types.SortOrder, ...) (servers []types.ServerCore, err error)
- func (mgr *Manager) GetTotalPlayers() (players int, err error)
- func (mgr *Manager) LoadAllAddresses() (result []string, err error)
- func (mgr *Manager) RemoveServer(address string) (err error)
- func (mgr *Manager) UpsertServer(server types.Server) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { MongoHost string `split_words:"true" required:"true"` MongoPort string `split_words:"true" required:"true"` MongoName string `split_words:"true" required:"true"` MongoUser string `split_words:"true" required:"true"` MongoPass string `split_words:"true" required:"false"` MongoCollection string `split_words:"true" required:"true"` }
Config describes db connection information
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager provides access to collections and predefined CRUD functionality.
func (*Manager) ArchiveServer ¶
ArchiveServer marks a server as inactive by setting the `Active` field to false
func (*Manager) GetActiveServers ¶
GetActiveServers returns the number of active servers
func (*Manager) GetInactiveServers ¶
GetInactiveServers returns the number of inactive servers
func (*Manager) GetServers ¶
func (mgr *Manager) GetServers(pageNum int, pageSize types.PageSize, sort types.SortOrder, by types.SortColumn, filters []types.FilterAttribute) (servers []types.ServerCore, err error)
GetServers returns a slice of Core objects
func (*Manager) GetTotalPlayers ¶
GetTotalPlayers returns the number of total players
func (*Manager) LoadAllAddresses ¶
LoadAllAddresses loads all addresses from the database as a slice of strings for synchronisation with the QueryDaemon.
func (*Manager) RemoveServer ¶
RemoveServer deletes a server from the database
Click to show internal directories.
Click to hide internal directories.