websockets

package
v0.0.0-...-f349414 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatHandler

type ChatHandler struct {
	Upgrader        websocket.Upgrader
	Broadcast       chan entityPkg.ChatMessage
	Mutex           sync.Mutex
	Chatrooms       map[string]map[*websocket.Conn]bool
	UserDB          repository.UserInterface
	MessageDB       repository.MessageInterface
	RabbitMQQueueCH *amqp.Channel
}

func NewChatWebsocket

func NewChatWebsocket(userDB repository.UserInterface, messageDB repository.MessageInterface, rabbitMQQueueCH *amqp.Channel) *ChatHandler

func (*ChatHandler) HandleBotMessages

func (c *ChatHandler) HandleBotMessages(w http.ResponseWriter, r *http.Request)

func (*ChatHandler) HandleConnections

func (c *ChatHandler) HandleConnections(w http.ResponseWriter, r *http.Request)

func (*ChatHandler) HandleMessages

func (c *ChatHandler) HandleMessages()

func (*ChatHandler) HandleStockCommand

func (c *ChatHandler) HandleStockCommand(msg entityPkg.ChatMessage)

func (*ChatHandler) PostMessageToChatroom

func (c *ChatHandler) PostMessageToChatroom(msg entityPkg.ChatMessage)

Jump to

Keyboard shortcuts

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