usecase

package
v0.0.0-...-211e82d Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoomUsecase

type RoomUsecase struct {
	RoomManager *model.RoomManager
	// contains filtered or unexported fields
}

func NewRoomUsecase

func NewRoomUsecase() *RoomUsecase

NewRoomUsecase creates a new RoomUsecase instance.

func (*RoomUsecase) CreateRoom

func (uc *RoomUsecase) CreateRoom(name, owner string) (*model.Room, error)

CreateRoom creates a new room.

func (*RoomUsecase) GetRoomByID

func (uc *RoomUsecase) GetRoomByID(roomID string) (*model.Room, error)

GetRoomByID retrieves a room by its ID.

func (*RoomUsecase) HandleWebSocketConnection

func (uc *RoomUsecase) HandleWebSocketConnection(w http.ResponseWriter, r *http.Request, roomID, clientName string) error

HandleWebSocketConnection handles a WebSocket connection for a client.

func (*RoomUsecase) JoinRoom

func (uc *RoomUsecase) JoinRoom(roomID, clientName string) error

JoinRoom allows a client to join a room.

Jump to

Keyboard shortcuts

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