chat

package module
v0.0.0-...-8478c20 Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ServeWs

func ServeWs(hub *Hub, w http.ResponseWriter, r *http.Request, db *sqlx.DB, userId, chatId string)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

type Hub

type Hub struct {
	// contains filtered or unexported fields
}

func NewHub

func NewHub() *Hub

func (*Hub) Run

func (h *Hub) Run()

type IncomingMessage

type IncomingMessage struct {
	Message string `json:"message"`
	Sender  string `json:"sender"`
}

type OutgoingMessage

type OutgoingMessage struct {
	Content string `json:"content"`
	Sender  string `json:"sender"`
	Time    string `json:"time"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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