chat

package
v0.0.0-...-205d087 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chat

type Chat struct{}

func (*Chat) DisplayName

func (c *Chat) DisplayName() string

func (*Chat) MaxUsers

func (c *Chat) MaxUsers() *int

func (*Chat) MinUsers

func (c *Chat) MinUsers() *int

func (*Chat) New

func (c *Chat) New() websockets.Instance

type Instance

type Instance struct {
	websockets.BaseInstance
	// contains filtered or unexported fields
}

func (*Instance) Join

func (i *Instance) Join(session *websockets.Session, creation bool)

func (*Instance) Leave

func (i *Instance) Leave(session *websockets.Session)

func (*Instance) Methods

func (i *Instance) Methods() map[string]websockets.Method

func (*Instance) Resume

func (i *Instance) Resume(_ *websockets.Session) (result any, error *jsonrpc.Error)

func (*Instance) Start

func (i *Instance) Start(_ *websockets.Session) (result any, error *jsonrpc.Error)

type Message

type Message struct {
	Sender    User   `json:"sender"`
	Content   string `json:"content"`
	Timestamp int64  `json:"timestamp"`
}

type User

type User struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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