repository

package
v0.0.11-otel Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 7 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, p entry.Player) (
	g entry.Group, err error,
)

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

func (*GroupMgr) GenGroupID

func (m *GroupMgr) GenGroupID() int64

type Mgrs

type Mgrs struct {
	PlayerMgr *PlayerMgr
	GroupMgr  *GroupMgr
	TeamMgr   *TeamMgr
	RoomMgr   *RoomMgr
}

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) (p entry.Player, err error)

type RoomMgr

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

func NewRoomMgr

func NewRoomMgr(roomIDStart int64) *RoomMgr

NewRoomMgr creates a room repository.

func (*RoomMgr) CreateRoom

func (m *RoomMgr) CreateRoom(teamLimit int, t entry.Team) (r entry.Room, err error)

type TeamMgr

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

func NewTeamMgr

func NewTeamMgr(teamIDStart int64) *TeamMgr

NewTeamMgr creates a team repository.

func (*TeamMgr) CreateAITeam

func (m *TeamMgr) CreateAITeam(g entry.Group) (t entry.Team, err error)

func (*TeamMgr) CreateTeam

func (m *TeamMgr) CreateTeam(g entry.Group) (t entry.Team, err error)

Jump to

Keyboard shortcuts

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