room_table

package
v0.0.0-...-5387047 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoomTable

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

func NewRoomTable

func NewRoomTable() *RoomTable

func (*RoomTable) AddChannel

func (r *RoomTable) AddChannel(ctx context.Context, serverID uint8, chl server.Channel)

func (*RoomTable) AddRoom

func (r *RoomTable) AddRoom(ctx context.Context, data *server.Room) (*server.Room, error)

func (*RoomTable) AddServer

func (r *RoomTable) AddServer(ctx context.Context, srv server.Server)

func (*RoomTable) AddUser

func (r *RoomTable) AddUser(ctx context.Context, roomID uint16, userID uint32) (*server.Room, error)

func (*RoomTable) DeleteRoom

func (r *RoomTable) DeleteRoom(ctx context.Context, roomid uint16) error

func (*RoomTable) EndGame

func (r *RoomTable) EndGame(ctx context.Context, roomID uint16, userID uint32) (*server.Room, error)

func (*RoomTable) GetRoomInfo

func (r *RoomTable) GetRoomInfo(ctx context.Context, roomID uint16) (*server.Room, error)

func (*RoomTable) GetRoomList

func (r *RoomTable) GetRoomList(ctx context.Context, serverID, ChannelID uint8) ([]server.Room, error)

func (*RoomTable) GetServerList

func (r *RoomTable) GetServerList(ctx context.Context) ([]server.Server, error)

func (*RoomTable) LeaveUser

func (r *RoomTable) LeaveUser(ctx context.Context, roomID uint16, userID uint32) (*server.Room, error)

func (*RoomTable) SetUserHost

func (r *RoomTable) SetUserHost(ctx context.Context, roomID uint16, userID uint32, name string) (*server.Room, error)

func (*RoomTable) StartGame

func (r *RoomTable) StartGame(ctx context.Context, roomID uint16, userID uint32) (*server.Room, error)

func (*RoomTable) UpdateRoom

func (r *RoomTable) UpdateRoom(ctx context.Context, data *server.Room) error

func (*RoomTable) UpdateRoomSafe

func (r *RoomTable) UpdateRoomSafe(ctx context.Context, data *server.Room) error

Jump to

Keyboard shortcuts

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