subscription

package
v0.0.0-...-8ac9c69 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	UserChannel map[string][]chan *db.ChatMessage
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(database *bun.DB) *Handler

func (*Handler) AddUserChannel

func (h *Handler) AddUserChannel(userId string) error

func (*Handler) PublishMessage

func (h *Handler) PublishMessage(message *db.ChatMessage) error

func (*Handler) PublishMessageToUser

func (h *Handler) PublishMessageToUser(message *db.ChatMessage, id string)

func (*Handler) RemoveChatChannel

func (h *Handler) RemoveChatChannel(userId string, userChannel chan *db.ChatMessage) error

Jump to

Keyboard shortcuts

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