Documentation ¶
Index ¶
- type LobbyRepo
- func (l *LobbyRepo) FindServers(ctx context.Context, page, size int, sort string, filter bson.M) (types.PageResult[LobbyServer], error)
- func (l *LobbyRepo) InsertManyServers(ctx context.Context, servers []LobbyServer) (int, error)
- func (l *LobbyRepo) RemoveServers(ctx context.Context, filter bson.M) (int64, int64, error)
- type LobbyServer
- type LobbyServerDetails
- type LobbyStatisticInfo
- type LobbyStatisticItem
- type LobbyStatisticRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LobbyRepo ¶
type LobbyRepo struct {
// contains filtered or unexported fields
}
func NewLobbyRepo ¶
NewLobbyRepo returns new lobby mongo db operator
func (*LobbyRepo) FindServers ¶
func (l *LobbyRepo) FindServers(ctx context.Context, page, size int, sort string, filter bson.M) (types.PageResult[LobbyServer], error)
FindServers returns list of servers by page
func (*LobbyRepo) InsertManyServers ¶
type LobbyServer ¶
type LobbyServer struct { // geo info Region string `bson:"region"` Continent string `bson:"continent"` Area string `bson:"area"` City string `bson:"city"` PlatformName string `bson:"platform_name"` TagNames []string `bson:"tag_names"` // created at timestamp CreatedAt int64 `bson:"created_at"` lobbyapi.Server `bson:"inline"` }
type LobbyServerDetails ¶
type LobbyServerDetails struct { Area string CreatedAt int64 lobbyapi.ServerDetails `bson:"inline"` }
type LobbyStatisticInfo ¶
type LobbyStatisticInfo struct { TotalServers int64 `json:"totalServers" bson:"totalServers"` OnlinePlayers int64 `json:"onlinePlayers" bson:"onlinePlayers"` Platforms []LobbyStatisticItem `json:"platforms" bson:"platforms"` Area []LobbyStatisticItem `json:"area" bson:"area"` Ts int64 `json:"ts" bson:"ts"` }
type LobbyStatisticItem ¶
type LobbyStatisticRepo ¶
type LobbyStatisticRepo struct {
// contains filtered or unexported fields
}
func NewLobbyStatisticRepo ¶
func NewLobbyStatisticRepo(cli *qmgo.QmgoClient) *LobbyStatisticRepo
func (*LobbyStatisticRepo) GetMany ¶
func (l *LobbyStatisticRepo) GetMany(ctx context.Context, before, until, tail int64, duration time.Duration) ([]LobbyStatisticInfo, error)
func (*LobbyStatisticRepo) InsertOne ¶
func (l *LobbyStatisticRepo) InsertOne(ctx context.Context, data LobbyStatisticInfo) error
Click to show internal directories.
Click to hide internal directories.