Documentation ¶
Index ¶
- func Chat(rdb *redis.Client, channel string, content string) error
- type ChatService
- func (cs *ChatService) HandleWSError(err error, message string, conn *websocket.Conn)
- func (cs *ChatService) OnChannelMessage(conn *websocket.Conn, user *models.User)
- func (cs *ChatService) OnClientMessage(conn *websocket.Conn, user *models.User)
- func (cs *ChatService) OnConnect(conn *websocket.Conn, user *models.User) error
- func (cs *ChatService) OnDisconnect(conn *websocket.Conn, user *models.User) chan struct{}
- func (cs *ChatService) SendNotification(message *models.Message)
- type Client
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ChatService ¶
type ChatService struct {
// contains filtered or unexported fields
}
func NewChatService ¶
func NewChatService(firebaseApp *firebase.App, rdb *redis.Client, userRepo models.UserRepository, messageRepo models.MessageRepository, chatRepo models.ChatRepository, ) *ChatService
func (*ChatService) HandleWSError ¶
func (cs *ChatService) HandleWSError(err error, message string, conn *websocket.Conn)
func (*ChatService) OnChannelMessage ¶
func (cs *ChatService) OnChannelMessage(conn *websocket.Conn, user *models.User)
func (*ChatService) OnClientMessage ¶
func (cs *ChatService) OnClientMessage(conn *websocket.Conn, user *models.User)
func (*ChatService) OnDisconnect ¶
func (cs *ChatService) OnDisconnect(conn *websocket.Conn, user *models.User) chan struct{}
func (*ChatService) SendNotification ¶
func (cs *ChatService) SendNotification(message *models.Message)
Click to show internal directories.
Click to hide internal directories.