impl

package
v0.0.3-glicko2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Impl

type Impl struct {
	// contains filtered or unexported fields
}

Impl implements a default service, in most cases, you don't need to implement your own service.

func NewDefault

func NewDefault(
	groupPlayerLimit int, playerMgr *repository.PlayerMgr, groupMgr *repository.GroupMgr, groupChannel chan entry.Group,
	roomChannel chan entry.Room, options ...Option,
) *Impl

func (*Impl) AcceptInvite

func (impl *Impl) AcceptInvite(inviterUID string, inviteeInfo *pto.PlayerInfo, groupID int64) error

func (*Impl) CancelMatch

func (impl *Impl) CancelMatch(uid string) error

func (*Impl) ChangeRole

func (impl *Impl) ChangeRole(captainUID, targetUID string, role entry.GroupRole) error

func (*Impl) CreateGroup

func (impl *Impl) CreateGroup(param *pto.CreateGroup) (entry.Group, error)

func (*Impl) DissolveGroup

func (impl *Impl) DissolveGroup(uid string) error

func (*Impl) EnterGroup

func (impl *Impl) EnterGroup(info *pto.EnterGroup, groupID int64) error

func (*Impl) ExitGroup

func (impl *Impl) ExitGroup(uid string) error

func (*Impl) HandleMatchResult

func (impl *Impl) HandleMatchResult(r entry.Room)

func (*Impl) Invite

func (impl *Impl) Invite(inviterUID, inviteeUID string) error

func (*Impl) KickPlayer

func (impl *Impl) KickPlayer(captainUID, kickedUID string) error

func (*Impl) RefuseInvite

func (impl *Impl) RefuseInvite(inviterUID, inviteeUID string, groupID int64, refuseMsg string) error

func (*Impl) SetNearbyJoinGroup

func (impl *Impl) SetNearbyJoinGroup(captainUID string, allow bool) error

func (*Impl) SetRecentJoinGroup

func (impl *Impl) SetRecentJoinGroup(captainUID string, allow bool) error

func (*Impl) SetVoiceState

func (impl *Impl) SetVoiceState(uid string, state entry.PlayerVoiceState) error

func (*Impl) StartMatch

func (impl *Impl) StartMatch(captainUID string) error

type Option

type Option func(*Impl)

func WithNowFunc

func WithNowFunc(f func() int64) Option

Jump to

Keyboard shortcuts

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