types

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountConnectionsMAX

func CountConnectionsMAX() int

Types

type CreateRoomRequest

type CreateRoomRequest struct {
	RoomTTl time.Duration `json:"roomTTl"`
}

type GetDeletedRooms added in v1.0.4

type GetDeletedRooms struct {
	GameID uuid.UUID `json:"gameID"`
	RoomID uuid.UUID `json:"roomID"`
}

type Room

type Room struct {
	GameID uuid.UUID
	RoomID uuid.UUID

	ServerID []uuid.UUID

	Users []*User

	UpdatedAt time.Time
}

func (*Room) GetUser

func (r *Room) GetUser() (users []*User)

func (*Room) RemoveServerID

func (r *Room) RemoveServerID(id uuid.UUID)

func (*Room) RemoveUser

func (r *Room) RemoveUser(user uuid.UUID)

func (*Room) SetServerID

func (r *Room) SetServerID(id uuid.UUID)

func (*Room) SetUpdatedAt

func (r *Room) SetUpdatedAt()

func (*Room) SetUser

func (r *Room) SetUser(user *User)

type Settings

type Settings struct {
	ServerType          string `json:"serverType"`
	ServerPort          string `json:"serverPort"`
	ConnectionPort      string `json:"connectionPort"`
	ServerAddress       string `json:"serverAddress"`
	MaxConnections      int    `json:"maxConnections"`
	MaxRequestPerSecond int    `json:"maxRequestPerSecond"`
}

func NewSettings

func NewSettings() (settings Settings)

type User

type User struct {
	ID uuid.UUID

	Connection connection.DataSender
}

Jump to

Keyboard shortcuts

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