repository

package
v0.0.2-match-service Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GroupMgr

type GroupMgr struct {
	*collection.Manager[int64, entry.Group]
	// contains filtered or unexported fields
}

func NewGroupMgr

func NewGroupMgr(groupIDStart int64) *GroupMgr

NewGroupMgr creates a group repository, `groupIDStart`: the starting group ID.

func (*GroupMgr) CreateGroup

func (m *GroupMgr) CreateGroup(
	playerLimit int, mode constant.GameMode, modeVersion int64, strategy constant.MatchStrategy,
) (
	entry.Group, error,
)

CreateGroup creates a group according to `pto.PlayerInfo`.

func (*GroupMgr) GenGroupID

func (m *GroupMgr) GenGroupID() int64

type PlayerMgr

type PlayerMgr struct {
	*collection.Manager[string, entry.Player]
}

func NewPlayerMgr

func NewPlayerMgr() *PlayerMgr

func (*PlayerMgr) CreatePlayer

func (m *PlayerMgr) CreatePlayer(pInfo *pto.PlayerInfo) (entry.Player, error)

type RoomMgr

type RoomMgr struct {
	*collection.Manager[int64, entry.Room]
}

func NewRoomMgr

func NewRoomMgr() *RoomMgr

RoomMgr creates a room repository.

type TeamMgr

type TeamMgr struct {
	*collection.Manager[int64, entry.Team]
}

func NewTeamMgr

func NewTeamMgr(groupIDStart int64) *TeamMgr

NewTeamMgr creates a team repository.

func (*TeamMgr) CreateRoom

func (m *TeamMgr) CreateRoom() (entry.Room, error)

func (*TeamMgr) CreateTeam

func (m *TeamMgr) CreateTeam() (entry.Team, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL