client

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitRoomTableClient

func InitRoomTableClient(client RoomTable)

Types

type RoomTable

type RoomTable interface {
	AddRoom(ctx context.Context, data *server.Room) (*server.Room, error)
	UpdateRoom(ctx context.Context, data *server.Room) error
	DeleteRoom(ctx context.Context, roomid uint16) error
	GetRoomList(ctx context.Context, serverID, ChannelID uint8) ([]server.Room, error)
	GetServerList(ctx context.Context) ([]server.Server, error)
	AddServer(ctx context.Context, srv server.Server)
	AddChannel(ctx context.Context, serverID uint8, chl server.Channel)
	GetRoomInfo(ctx context.Context, roomID uint16) (*server.Room, error)
	UpdateRoomSafe(ctx context.Context, data *server.Room) error
	AddUser(ctx context.Context, roomID uint16, userID uint32) (*server.Room, error)
	LeaveUser(ctx context.Context, roomID uint16, userID uint32) (*server.Room, error)
	SetUserHost(ctx context.Context, roomID uint16, userID uint32, name string) (*server.Room, error)
	StartGame(ctx context.Context, roomID uint16, userID uint32) (*server.Room, error)
	EndGame(ctx context.Context, roomID uint16, userID uint32) (*server.Room, error)
}

func GetRoomTableClient

func GetRoomTableClient() RoomTable

Jump to

Keyboard shortcuts

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